You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug A clear and concise description of what the bug is.
We could have issues when deleting a bucket concurrently with an object upload.
To Reproduce Steps to reproduce the behavior:
Thread 1 starts a big file upload (creates a version with state=OPEN)
Thread 2 deletes the bucket in which the object of Thread1 lives
Thread 3 Garbage collector kicks in, and deletes the bucket permanently (plus objects and versions, including the one that was OPEN)
Thread 1 finished the file upload and wants to change the state of its version from OPEN to COMMITTED, but the version no longer exists.
Expected behavior A clear and concise description of what you expected to
happen.
When the thread uploading the file is done... it should return an error so the upload is retried and then will return a Bucket does not exist error.
We discussed this and the proposed solution was:
When deleting the bucket we also update the database and set all versions that are in state=OPEN to state=DELETED (in a transaction)
When the thread uploading the file finishes it tries upload the versions with the version id corresponding to the version it is uploading and WHERE state=OPEN.
It won't update any row if the bucket was deleted (because the state was changed to DELETED in the previous step) and we can return an internal error.
The text was updated successfully, but these errors were encountered:
0xavi0
changed the title
[BUG] Possible race condition when deleting a bucket while an object is being pushed
[BUG] Possible race condition when deleting a bucket while an object is being uploaded
Jun 15, 2023
Describe the bug A clear and concise description of what the bug is.
We could have issues when deleting a bucket concurrently with an object upload.
To Reproduce Steps to reproduce the behavior:
Thread 1 starts a big file upload (creates a version with state=OPEN)
Thread 2 deletes the bucket in which the object of Thread1 lives
Thread 3 Garbage collector kicks in, and deletes the bucket permanently (plus objects and versions, including the one that was OPEN)
Thread 1 finished the file upload and wants to change the state of its version from OPEN to COMMITTED, but the version no longer exists.
Expected behavior A clear and concise description of what you expected to
happen.
When the thread uploading the file is done... it should return an error so the upload is retried and then will return a Bucket does not exist error.
We discussed this and the proposed solution was:
When deleting the bucket we also update the database and set all versions that are in state=OPEN to state=DELETED (in a transaction)
When the thread uploading the file finishes it tries upload the versions with the version id corresponding to the version it is uploading and WHERE state=OPEN.
It won't update any row if the bucket was deleted (because the state was changed to DELETED in the previous step) and we can return an
internal error
.The text was updated successfully, but these errors were encountered: