Relax restriction on timestamp reuse in chunks, add test.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
pull/299/head
Tom Wilkie 6 years ago committed by Tom Wilkie
parent 5cb9e239a6
commit 26f3b52096
  1. 2
      pkg/chunkenc/gzip.go
  2. 8
      pkg/chunkenc/gzip_test.go

@ -82,7 +82,7 @@ func (hb *headBlock) isEmpty() bool {
}
func (hb *headBlock) append(ts int64, line string) error {
if !hb.isEmpty() && hb.maxt >= ts {
if !hb.isEmpty() && hb.maxt > ts {
return ErrOutOfOrder
}

@ -54,6 +54,14 @@ func TestGZIPBlock(t *testing.T) {
ts: 8,
str: "hello, worl\nd8!",
},
{
ts: 8,
str: "hello, world 8, 2!",
},
{
ts: 8,
str: "hello, world 8, 3!",
},
{
ts: 9,
str: "",

Loading…
Cancel
Save