Remove DropGraves() #1493

Merged
fyrchik merged 4 commits from fyrchik/frostfs-node:metabase-put into master 2024-11-14 06:47:05 +00:00
Owner

DropGraves() is always called after we have inhumed tombstones.
It iterates over the same set of object IDs and the possibility of inconsistenty (Inhume() was called, then we crash).
Merge both methods into a single one, atomically remove a tombstone.

DropGraves() is always called after we have inhumed tombstones. It iterates over the same set of object IDs and the possibility of inconsistenty (Inhume() was called, then we crash). Merge both methods into a single one, atomically remove a tombstone.
fyrchik force-pushed metabase-put from f948e5c4ad to 5c58c60362 2024-11-13 11:02:56 +00:00 Compare
requested reviews from storage-core-committers, storage-core-developers 2024-11-13 11:03:01 +00:00
acid-ant reviewed 2024-11-13 11:40:42 +00:00
@ -289,0 +288,4 @@
var res InhumeRes
err := db.boltDB.Batch(func(tx *bbolt.Tx) error {
res = InhumeRes{inhumedByCnrID: make(map[cid.ID]ObjectCounters)}
Member

Do we need to allocate it here once we don't want to return it?

Do we need to allocate it here once we don't want to return it?
Author
Owner

We need to initialize it here, because the function in Batch may be executed multiple times.

We need to initialize it here, because the function in `Batch` may be executed multiple times.
Author
Owner

Oh, wait, it should be returned, the result is used in the caller.

Oh, wait, it should be returned, the result is used in the caller.
Author
Owner

fixed

fixed
Author
Owner

extended the test to check the return value

extended the test to check the return value
acid-ant marked this conversation as resolved
fyrchik force-pushed metabase-put from 5c58c60362 to 11366f56b6 2024-11-13 12:27:39 +00:00 Compare
fyrchik changed title from Remove DropGraves() to WIP: Remove DropGraves() 2024-11-13 12:40:04 +00:00
fyrchik force-pushed metabase-put from 11366f56b6 to a35d21731a 2024-11-13 12:56:00 +00:00 Compare
fyrchik force-pushed metabase-put from a35d21731a to c4e40862e2 2024-11-13 12:56:24 +00:00 Compare
fyrchik changed title from WIP: Remove DropGraves() to Remove DropGraves() 2024-11-13 12:56:59 +00:00
fyrchik changed title from WIP: Remove DropGraves() to Remove DropGraves() 2024-11-13 12:57:00 +00:00
acid-ant approved these changes 2024-11-13 13:06:54 +00:00
dstepanov-yadro approved these changes 2024-11-13 13:18:16 +00:00
fyrchik force-pushed metabase-put from c4e40862e2 to b74189f7dc 2024-11-13 13:48:54 +00:00 Compare
fyrchik force-pushed metabase-put from b74189f7dc to df97011a5a 2024-11-13 13:49:28 +00:00 Compare
fyrchik merged commit d77a218f7c into master 2024-11-14 06:47:05 +00:00
fyrchik deleted branch metabase-put 2024-11-14 06:47:09 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 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#1493
No description provided.