Skip to content

Commit 4a00949

Browse files
committed
Remove -store.fullsize-chunks option
It broke ingester hand-overs, and is not needed now we use BigChunk. I left in the code which allows non-full-size chunks to be read in: maybe someone has some in a database. Signed-off-by: Bryan Boreham <[email protected]>
1 parent fecea5b commit 4a00949

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* [CHANGE] Query Frontend now uses Round Robin to choose a tenant queue to service next. #2553
66
* [CHANGE] `-promql.lookback-delta` is now deprecated and has been replaced by `-querier.lookback-delta` along with `lookback_delta` entry under `querier` in the config file. `-promql.lookback-delta` will be removed in v1.4.0. #2604
7+
* [CHANGE] Removed `-store.fullsize-chunks` option which was undocumented and unused (it broke ingester hand-overs).
78
* [FEATURE] TLS config options added for GRPC clients in Querier (Query-frontend client & Ingester client), Ruler, Store Gateway, as well as HTTP client in Config store client. #2502
89
* [FEATURE] The flag `-frontend.max-cache-freshness` is now supported within the limits overrides, to specify per-tenant max cache freshness values. The corresponding YAML config parameter has been changed from `results_cache.max_freshness` to `limits_config.max_cache_freshness`. The legacy YAML config parameter (`results_cache.max_freshness`) will continue to be supported till Cortex release `v1.4.0`. #2609
910
* [ENHANCEMENT] Experimental TSDB: added the following metrics to the ingester: #2580 #2583 #2589

pkg/chunk/encoding/chunk_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ func TestLen(t *testing.T) {
5656
var step = int(15 * time.Second / time.Millisecond)
5757

5858
func TestChunk(t *testing.T) {
59-
alwaysMarshalFullsizeChunks = false
6059
for _, tc := range []struct {
6160
encoding Encoding
6261
maxSamples int

pkg/chunk/encoding/factory.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@ type Config struct{}
1515

1616
var (
1717
// DefaultEncoding exported for use in unit tests elsewhere
18-
DefaultEncoding = Bigchunk
19-
alwaysMarshalFullsizeChunks = true
20-
bigchunkSizeCapBytes = 0
18+
DefaultEncoding = Bigchunk
19+
bigchunkSizeCapBytes = 0
2120
)
2221

2322
// RegisterFlags registers configuration settings.
2423
func (Config) RegisterFlags(f *flag.FlagSet) {
2524
f.Var(&DefaultEncoding, "ingester.chunk-encoding", "Encoding version to use for chunks.")
26-
flag.BoolVar(&alwaysMarshalFullsizeChunks, "store.fullsize-chunks", alwaysMarshalFullsizeChunks, "When saving varbit chunks, pad to 1024 bytes")
2725
flag.IntVar(&bigchunkSizeCapBytes, "store.bigchunk-size-cap-bytes", bigchunkSizeCapBytes, "When using bigchunk encoding, start a new bigchunk if over this size (0 = unlimited)")
2826
}
2927

pkg/chunk/encoding/varbit.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ func (c varbitChunk) Utilization() float64 {
318318
}
319319

320320
// marshalLen returns the number of bytes that should be marshalled for this chunk
321+
// (if someone has used a version of this code that doesn't just send 1024 every time)
321322
func (c varbitChunk) marshalLen() int {
322323
bits := c.nextSampleOffset()
323324
if bits < varbitThirdSampleBitOffset {
@@ -340,10 +341,7 @@ func (c varbitChunk) Len() int {
340341
}
341342

342343
func (c varbitChunk) Size() int {
343-
if alwaysMarshalFullsizeChunks {
344-
return cap(c)
345-
}
346-
return c.marshalLen()
344+
return cap(c)
347345
}
348346

349347
func (c varbitChunk) firstTime() model.Time {

0 commit comments

Comments
 (0)