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
Avoid double compaction by cleaning partition files in 2 cycles (#7130)
* Avoid double compaction by cleaning partition files in 2 cycles
Signed-off-by: Anna Tran <[email protected]>
* Clean partition group blocks as first step in cleanUser
Signed-off-by: Anna Tran <[email protected]>
* Update CHANGELOG
Signed-off-by: Anna Tran <[email protected]>
---------
Signed-off-by: Anna Tran <[email protected]>
level.Warn(userLogger).Log("msg", "unable to mark all blocks in partitioned group info for deletion", "partitioned_group_id", partitionedGroupInfo.PartitionedGroupID)
797
799
// if one block can not be marked for deletion, we should
798
800
// skip delete this partitioned group. next iteration
level.Warn(userLogger).Log("msg", "failed to delete partitioned group info", "partitioned_group_info", partitionedGroupInfoFile, "err", err)
806
-
} else {
807
-
level.Info(userLogger).Log("msg", "deleted partitioned group info", "partitioned_group_info", partitionedGroupInfoFile)
804
+
ifdeletedBlocksCount>0 {
805
+
level.Info(userLogger).Log("msg", "parent blocks deleted, will delete partition group file in next cleaning cycle", "partitioned_group_id", partitionedGroupInfo.PartitionedGroupID)
806
+
} else {
807
+
level.Info(userLogger).Log("msg", "deleting partition group now that all associated blocks have been deleted", "partitioned_group_id", partitionedGroupInfo.PartitionedGroupID)
iferr:=block.MarkForDeletion(ctx, userLogger, userBucket, blockID, "delete block during partitioned group completion check", blocksMarkedForDeletion.WithLabelValues(userID, reasonValueRetention)); err!=nil {
246
246
level.Warn(userLogger).Log("msg", "unable to mark block for deletion", "partitioned_group_id", p.PartitionedGroupID, "block", blockID.String())
247
-
returnerr
247
+
returndeleteBlocksCount, err
248
248
}
249
249
deleteBlocksCount++
250
250
level.Debug(userLogger).Log("msg", "marked block for deletion during partitioned group info clean up", "partitioned_group_id", p.PartitionedGroupID, "block", blockID.String())
0 commit comments