Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag denoting first sync response #593

Merged
merged 4 commits into from
Aug 8, 2024
Merged

Add flag denoting first sync response #593

merged 4 commits into from
Aug 8, 2024

Conversation

gruuya
Copy link
Contributor

@gruuya gruuya commented Aug 7, 2024

The flag is tracked in SeafowlFlightHandler since it is the one that actually constructs the response (not SeafowlDataSyncWriter), and in addition it has short-circuiting for the "probing" request.

Also enable IF (NOT) EXISTS short-circuiting for table creation/dropping, so it also closes #589.

src/frontend/flight/handler.rs Outdated Show resolved Hide resolved
@@ -47,6 +48,8 @@ pub(super) struct SeafowlFlightHandler {
pub context: Arc<SeafowlContext>,
pub results: Arc<DashMap<String, Mutex<SendableRecordBatchStream>>>,
sync_writer: Arc<RwLock<SeafowlDataSyncWriter>>,
// Denotes whether we're past the first sync reponse, thus indicating Seafowl (re)starts
first_sync: Arc<AtomicBool>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't need to be tracked for each origin separately?

Copy link
Contributor Author

@gruuya gruuya Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding was no, only the overall response order is important, cc @eatonphil?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right

@gruuya gruuya merged commit 5cc286a into main Aug 8, 2024
1 check passed
@gruuya gruuya deleted the first-sync-flag branch August 8, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow Table List Retrieval in Many Tables
3 participants