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
* Implement partition compaction grouper
Signed-off-by: Alex Le <[email protected]>
* fix comment
Signed-off-by: Alex Le <[email protected]>
* replace level 1 compaction limits with ingestion replication factor
Signed-off-by: Alex Le <[email protected]>
* fix doc
Signed-off-by: Alex Le <[email protected]>
* update compaction_visit_marker_timeout default value
Signed-off-by: Alex Le <[email protected]>
* update default value for compactor_partition_index_size_limit_in_bytes
Signed-off-by: Alex Le <[email protected]>
* refactor code
Signed-off-by: Alex Le <[email protected]>
* address comments and refactor
Signed-off-by: Alex Le <[email protected]>
* address comment
Signed-off-by: Alex Le <[email protected]>
* address comment
Signed-off-by: Alex Le <[email protected]>
* update config name
Signed-off-by: Alex Le <[email protected]>
* Implement partition compaction planner
Signed-off-by: Alex Le <[email protected]>
* fix after rebase
Signed-off-by: Alex Le <[email protected]>
* addressed comments
Signed-off-by: Alex Le <[email protected]>
* updated doc and refactored metric
Signed-off-by: Alex Le <[email protected]>
* fix test
Signed-off-by: Alex Le <[email protected]>
---------
Signed-off-by: Alex Le <[email protected]>
f.BoolVar(&cfg.AcceptMalformedIndex, "compactor.accept-malformed-index", false, "When enabled, index verification will ignore out of order label names.")
306
307
f.BoolVar(&cfg.CachingBucketEnabled, "compactor.caching-bucket-enabled", false, "When enabled, caching bucket will be used for compactor, except cleaner service, which serves as the source of truth for block status")
308
+
309
+
f.DurationVar(&cfg.ShardingPlannerDelay, "compactor.sharding-planner-delay", 10*time.Second, "How long shuffle sharding planner would wait before running planning code. This delay would prevent double compaction when two compactors claimed same partition in grouper at same time.")
returnnil, fmt.Errorf("unable to get visit marker file for partition with partition ID %d, partitioned group ID %d: %s", partitionID, partitionedGroupID, err.Error())
level.Warn(p.logger).Log("msg", "partition is not visited by current compactor", "partitioned_group_id", partitionedGroupID, "partition_id", partitionID, "compactor_id", p.ringLifecyclerID, existingPartitionVisitMarker.String())
108
+
returnnil, plannerVisitedPartitionError
109
+
}
110
+
}
111
+
112
+
// Ensure all blocks fits within the largest range. This is a double check
113
+
// to ensure there's no bug in the previous blocks grouping, given this Plan()
114
+
// is just a pass-through.
115
+
// Modified from https://github.com/cortexproject/cortex/pull/2616/files#diff-e3051fc530c48bb276ba958dd8fadc684e546bd7964e6bc75cef9a86ef8df344R28-R63
level.Warn(p.logger).Log("msg", "block is outside the largest expected range", "partitioned_group_id", partitionedGroupID, "partition_id", partitionID, "block_id", blockID, "block_min_time", b.MinTime, "block_max_time", b.MaxTime, "range_start", rangeStart, "range_end", rangeEnd)
134
+
returnnil, fmt.Errorf("block %s with time range %d:%d is outside the largest expected range %d:%d", blockID, b.MinTime, b.MaxTime, rangeStart, rangeEnd)
0 commit comments