Skip to content

Commit 54c4a64

Browse files
authored
Remove -store.fullsize-chunks option (#2656)
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 e43e3cc commit 54c4a64

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
@@ -51,6 +51,7 @@
5151
* [CHANGE] Experimental Memberlist ring: randomize gossip node names to avoid conflicts when running multiple clients on the same host, or reusing host names (eg. pods in statefulset). Node name randomization can be disabled by using `-memberlist.randomize-node-name=false`. #2715
5252
* [CHANGE] Memberlist KV client is no longer considered experimental. #2725
5353
* [CHANGE] Change target flag for purger from `data-purger` to `purger` and make delete request cancellation duration configurable. #2760
54+
* [CHANGE] Removed `-store.fullsize-chunks` option which was undocumented and unused (it broke ingester hand-overs). #2656
5455
* [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
5556
* [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
5657
* [FEATURE] Experimental gRPC Store: Added support to 3rd parties index and chunk stores using gRPC client/server plugin mechanism. #2220

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)