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

Put get-released-data record-count and result-stream in one transaction #2778

Open
corneliusroemer opened this issue Sep 13, 2024 · 1 comment
Labels
backend related to the loculus backend component bug Something isn't working

Comments

@corneliusroemer
Copy link
Contributor

corneliusroemer commented Sep 13, 2024

Low priority

See:

// There's a possibility that the totalRecords change between the count and the actual query
// this is not too bad, if the client ends up with a few more records than expected
// We just need to make sure the etag used is from before the count
// Alternatively, we could read once to file while counting and then stream the file

This was discussed in PR, @anna-parker tested (IIUC) that this can happen (by introducing an exaggeratedly long delay between count and streaming through sleep - it is unlikely to cause any harm in practice, and the PR makes things in no way worse than without it.

#2773

@corneliusroemer corneliusroemer added backend related to the loculus backend component feature Feature proposal labels Sep 13, 2024
@chaoran-chen
Copy link
Member

chaoran-chen commented Sep 13, 2024

As this means that the value in the header can potentially be wrong, I'd rather classify it as a bug. If there are few sequences and unfrequent new submissions, I agree that it is not a big problem. If we go to an outbreak / pandemic situtation with millions of sequences and frequent uploads, this changes.

@chaoran-chen chaoran-chen added bug Something isn't working and removed feature Feature proposal labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend related to the loculus backend component bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants