-
Notifications
You must be signed in to change notification settings - Fork 7
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
bugfix/persist fileID over changes of the service instance #1357
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20dbf32
to
ddee219
Compare
jbygdell
requested changes
Feb 5, 2025
jbygdell
reviewed
Feb 5, 2025
5f1f862
to
715b2b3
Compare
jbygdell
requested changes
Feb 11, 2025
eb5d543
to
518a823
Compare
518a823
to
b8d3c47
Compare
nanjiangshu
reviewed
Feb 11, 2025
nanjiangshu
reviewed
Feb 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well when I tested according to the description. Just left a minor comment about how the proper error should be returned.
Co-authored-by: Joakim Bygdell <joakim.bygdell@nbis.se>
b8d3c47
to
8d0998f
Compare
nanjiangshu
approved these changes
Feb 11, 2025
jbygdell
approved these changes
Feb 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue(s) and PR(s)
This PR closes a bug first reported by our endusers: #1358.
Description
It provides a fix for the case when for example a client loses connection to the server while uploading a file and when connection is re-established the upload continues through a different s3inbox instance. In such a case, the registered
fileID
for the file in question would not have been persisted on the new instance, but now it does.How to test
I found it somewhat difficult to come up with an automated test for this without a heavy refactoring of the code into small batches of separate functions (that would otherwise not serve any purpose) . Any ideas welcome!
I tested it locally by temporarily adding
p.fileIds[r.URL.Path] = ""
in line 202, building the image and bringing the sda stack up using themake
commands, uploading a file to the inbox and seeing that the logs show no errors. Without the fix of the PR the previous procedure will reproduce the error seen on the cluster. Make sure to upload a file from scratch because otherwise the state of the database will render this test obsolete (as it happened when testing my initial fix..).This should be fixed now. So PR open again.
Note: the failing test is not related to this PR per se.