WIP: Put a tombstone on a different shard if a target shard is read-only #1403

Closed
a-savchuk wants to merge 3 commits from a-savchuk/frostfs-node:put-tombstone-on-different-shard into master
Member

Currently, when an object on some shard is inhumed, the engine places a tombstone on the same shard. If the target shard is read-only, the engine fails.

In that case, we want the engine to correctly place a tombstone on a different shard, ensuring that:

  • An object becomes unavailable if a tombstone was placed on a different shard.
  • GC deletes an object if a tombstone was placed on a different shard.

Signed-off-by: Aleksey Savchuk a.savchuk@yadro.com

Currently, when an object on some shard is inhumed, the engine places a tombstone on the same shard. If the target shard is read-only, the engine fails. In that case, we want the engine to correctly place a tombstone on a different shard, ensuring that: - [x] An object becomes unavailable if a tombstone was placed on a different shard. - [ ] GC deletes an object if a tombstone was placed on a different shard. Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
a-savchuk added 1 commit 2024-10-01 09:44:18 +00:00
[#xx] engine: Add tests for object deletion on read-only shard
Some checks failed
DCO action / DCO (pull_request) Failing after 1m9s
Tests and linters / Run gofumpt (pull_request) Successful in 2m26s
Vulncheck / Vulncheck (pull_request) Successful in 2m35s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m41s
Build / Build Components (pull_request) Successful in 3m6s
Tests and linters / Lint (pull_request) Successful in 3m47s
Tests and linters / Staticcheck (pull_request) Successful in 3m46s
Tests and linters / gopls check (pull_request) Successful in 3m48s
Tests and linters / Tests (pull_request) Failing after 6m8s
Tests and linters / Tests with -race (pull_request) Failing after 6m11s
0c15185883
Currently, when an object on some shard is inhumed, the engine places a
tombstone on the same shard. If the target shard is read-only, the engine fails.

In that case, we want the engine to correctly place a tombstone on a different
shard, ensuring that:
- An object becomes unavailable if a tombstone was placed on a different shard.
  See `TestObjectUnavailableIfTombstoneOnDifferentShard` test.
- GC deletes an object if a tombstone was placed on a different shard.
  See `TestObjectDeletedIfTombstoneOnDifferentShard` test.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
a-savchuk force-pushed put-tombstone-on-different-shard from 0c15185883 to d511a08b60 2024-10-01 09:45:26 +00:00 Compare
Author
Member

Both tests should fail before the bug is fixed

Both tests should fail before the bug is fixed
a-savchuk force-pushed put-tombstone-on-different-shard from d511a08b60 to 13f66540c1 2024-10-07 12:45:18 +00:00 Compare
a-savchuk force-pushed put-tombstone-on-different-shard from 13f66540c1 to 4d79969d12 2024-10-07 12:46:23 +00:00 Compare
a-savchuk force-pushed put-tombstone-on-different-shard from 4d79969d12 to f3735d0fb9 2024-10-07 12:56:47 +00:00 Compare
a-savchuk force-pushed put-tombstone-on-different-shard from f3735d0fb9 to 3c1aaee84f 2024-10-07 13:09:23 +00:00 Compare
a-savchuk force-pushed put-tombstone-on-different-shard from 3c1aaee84f to c4fca96dd1 2024-10-07 13:20:53 +00:00 Compare
a-savchuk force-pushed put-tombstone-on-different-shard from c4fca96dd1 to 2dc934839a 2024-10-08 09:29:39 +00:00 Compare
Author
Member

We decided that supporting the ability to write a GC mark to a different shard leads to

  • A significant slowdown in read operations
    • If an object and its mark are on different shards, all the shards must be checked to ensure this
    • The situation where an object and its label are on different shards is rare, but checking all the shards will be necessary every time
    • The number of shards can be quite large (~100-200 disks)
  • Increased complexity for the GC

I close this PR

We decided that supporting the ability to write a GC mark to a different shard leads to - A significant slowdown in read operations - If an object and its mark are on different shards, all the shards must be checked to ensure this - The situation where an object and its label are on different shards is rare, but checking all the shards will be necessary every time - The number of shards can be quite large (~100-200 disks) - Increased complexity for the GC I close this PR
a-savchuk closed this pull request 2024-10-14 08:35:35 +00:00
Some checks failed
DCO action / DCO (pull_request) Successful in 1m31s
Required
Details
Vulncheck / Vulncheck (pull_request) Successful in 2m14s
Required
Details
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m24s
Required
Details
Build / Build Components (pull_request) Successful in 2m28s
Required
Details
Tests and linters / Lint (pull_request) Successful in 2m59s
Required
Details
Tests and linters / Run gofumpt (pull_request) Successful in 2m55s
Required
Details
Tests and linters / gopls check (pull_request) Successful in 3m13s
Required
Details
Tests and linters / Tests (pull_request) Failing after 3m30s
Required
Details
Tests and linters / Staticcheck (pull_request) Successful in 3m35s
Required
Details
Tests and linters / Tests with -race (pull_request) Failing after 5m5s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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#1403
No description provided.