Handle nasty race condition when putting tombstone #1435

Merged
dstepanov-yadro merged 1 commit from fyrchik/frostfs-node:fix-gc into master 2024-10-26 11:30:27 +00:00
Owner

Close #1433

Close #1433
fyrchik added 2 commits 2024-10-17 11:56:10 +00:00
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
[#1433] services/object: Put object before auxiliary info
All checks were successful
DCO action / DCO (pull_request) Successful in 1m24s
Tests and linters / Run gofumpt (pull_request) Successful in 1m18s
Vulncheck / Vulncheck (pull_request) Successful in 1m30s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m20s
Build / Build Components (pull_request) Successful in 2m30s
Tests and linters / gopls check (pull_request) Successful in 2m50s
Tests and linters / Staticcheck (pull_request) Successful in 3m22s
Tests and linters / Lint (pull_request) Successful in 3m55s
Tests and linters / Tests (pull_request) Successful in 6m3s
Tests and linters / Tests with -race (pull_request) Successful in 6m2s
b42bcdc6fa
Consider the following operations ordering:
1. Inhume(with tombstone A) --> add tombstone mark for an object
2. --> new epoch arives
3. --> GCMark is added for a tombstone A, because it is unavailable
4. Put(A) --> return error, because the object already has a GCMark

It is possible, and I have successfully reproduced it with a test on the
shard level. However, the error is related to the specific
_ordering_ of operations with engine. And triggering race-conditions like
this is only possible on a shard level currently, so no tests are
written.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik requested review from storage-core-committers 2024-10-17 11:56:22 +00:00
fyrchik requested review from storage-core-developers 2024-10-17 11:56:25 +00:00
achuprov approved these changes 2024-10-17 12:35:18 +00:00
dstepanov-yadro approved these changes 2024-10-17 12:38:07 +00:00
a-savchuk approved these changes 2024-10-17 12:44:41 +00:00
acid-ant approved these changes 2024-10-17 12:59:26 +00:00
dstepanov-yadro merged commit b42bcdc6fa into master 2024-10-17 13:00:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1435
No description provided.