metabase: Fix drop buckets during resync #1050

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:fix/resync_bucket_drop into master 2024-03-19 11:45:06 +00:00

Relates #1048

BBolt's ForEach functions don't allow to edit iterator items. This leads to undefined behavior.
TestResetDropsContainerBuckets fails without fix.

Relates #1048 BBolt's `ForEach` functions don't allow to edit iterator items. This leads to undefined behavior. `TestResetDropsContainerBuckets` fails without fix.
dstepanov-yadro reviewed 2024-03-19 08:56:00 +00:00
@ -0,0 +1,57 @@
package meta
Author
Member

Moved to separate file to use the meta package to have access to boltdb field.

Moved to separate file to use the `meta` package to have access to `boltdb` field.
dstepanov-yadro requested review from storage-core-committers 2024-03-19 09:12:26 +00:00
dstepanov-yadro requested review from storage-core-developers 2024-03-19 09:12:27 +00:00
aarifullin approved these changes 2024-03-19 09:34:00 +00:00
fyrchik reviewed 2024-03-19 10:43:06 +00:00
@ -171,2 +175,3 @@
for name != nil {
if _, ok := mStaticBuckets[string(name)]; !ok {
return tx.DeleteBucket(name)
nameCopy := bytes.Clone(name)
Owner

Why do we need clone here? The name should not be changed by DeleteBucket

Why do we need clone here? The name should not be changed by `DeleteBucket`
Author
Member

oups, fixed

oups, fixed
dstepanov-yadro force-pushed fix/resync_bucket_drop from 47c7a31d01 to c09c701613 2024-03-19 11:29:03 +00:00 Compare
fyrchik approved these changes 2024-03-19 11:44:54 +00:00
fyrchik merged commit c09c701613 into master 2024-03-19 11:45:06 +00:00
acid-ant approved these changes 2024-03-19 11:51:21 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 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#1050
No description provided.