Add hidden flag to disable overlapping compaction (#14581)
TSDB: add hidden flag to disable overlapping compaction Signed-off-by: Ben Ye <benye@amazon.com> --------- Signed-off-by: Ben Ye <benye@amazon.com>
This commit is contained in:
parent
27579c9148
commit
b7a58dcf3d
|
@ -384,6 +384,9 @@ func main() {
|
||||||
serverOnlyFlag(a, "storage.tsdb.allow-overlapping-blocks", "[DEPRECATED] This flag has no effect. Overlapping blocks are enabled by default now.").
|
serverOnlyFlag(a, "storage.tsdb.allow-overlapping-blocks", "[DEPRECATED] This flag has no effect. Overlapping blocks are enabled by default now.").
|
||||||
Default("true").Hidden().BoolVar(&b)
|
Default("true").Hidden().BoolVar(&b)
|
||||||
|
|
||||||
|
serverOnlyFlag(a, "storage.tsdb.allow-overlapping-compaction", "Allow compaction of overlapping blocks. If set to false, TSDB stops vertical compaction and leaves overlapping blocks there. The use case is to let another component handle the compaction of overlapping blocks.").
|
||||||
|
Default("true").Hidden().BoolVar(&cfg.tsdb.EnableOverlappingCompaction)
|
||||||
|
|
||||||
serverOnlyFlag(a, "storage.tsdb.wal-compression", "Compress the tsdb WAL.").
|
serverOnlyFlag(a, "storage.tsdb.wal-compression", "Compress the tsdb WAL.").
|
||||||
Hidden().Default("true").BoolVar(&cfg.tsdb.WALCompression)
|
Hidden().Default("true").BoolVar(&cfg.tsdb.WALCompression)
|
||||||
|
|
||||||
|
@ -1719,6 +1722,7 @@ type tsdbOptions struct {
|
||||||
EnableMemorySnapshotOnShutdown bool
|
EnableMemorySnapshotOnShutdown bool
|
||||||
EnableNativeHistograms bool
|
EnableNativeHistograms bool
|
||||||
EnableDelayedCompaction bool
|
EnableDelayedCompaction bool
|
||||||
|
EnableOverlappingCompaction bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (opts tsdbOptions) ToTSDBOptions() tsdb.Options {
|
func (opts tsdbOptions) ToTSDBOptions() tsdb.Options {
|
||||||
|
@ -1739,8 +1743,8 @@ func (opts tsdbOptions) ToTSDBOptions() tsdb.Options {
|
||||||
EnableMemorySnapshotOnShutdown: opts.EnableMemorySnapshotOnShutdown,
|
EnableMemorySnapshotOnShutdown: opts.EnableMemorySnapshotOnShutdown,
|
||||||
EnableNativeHistograms: opts.EnableNativeHistograms,
|
EnableNativeHistograms: opts.EnableNativeHistograms,
|
||||||
OutOfOrderTimeWindow: opts.OutOfOrderTimeWindow,
|
OutOfOrderTimeWindow: opts.OutOfOrderTimeWindow,
|
||||||
EnableOverlappingCompaction: true,
|
|
||||||
EnableDelayedCompaction: opts.EnableDelayedCompaction,
|
EnableDelayedCompaction: opts.EnableDelayedCompaction,
|
||||||
|
EnableOverlappingCompaction: opts.EnableOverlappingCompaction,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,6 @@ type Options struct {
|
||||||
// The reason why this flag exists is because there are various users of the TSDB
|
// The reason why this flag exists is because there are various users of the TSDB
|
||||||
// that do not want vertical compaction happening on ingest time. Instead,
|
// that do not want vertical compaction happening on ingest time. Instead,
|
||||||
// they'd rather keep overlapping blocks and let another component do the overlapping compaction later.
|
// they'd rather keep overlapping blocks and let another component do the overlapping compaction later.
|
||||||
// For Prometheus, this will always be true.
|
|
||||||
EnableOverlappingCompaction bool
|
EnableOverlappingCompaction bool
|
||||||
|
|
||||||
// EnableSharding enables query sharding support in TSDB.
|
// EnableSharding enables query sharding support in TSDB.
|
||||||
|
|
Loading…
Reference in New Issue