diff --git a/pkg/chunkenc/memchunk.go b/pkg/chunkenc/memchunk.go index 1c548d73c02a..eccda20ab3c9 100644 --- a/pkg/chunkenc/memchunk.go +++ b/pkg/chunkenc/memchunk.go @@ -911,8 +911,8 @@ func (c *MemChunk) Blocks(mintT, maxtT time.Time) []Block { // Rebound builds a smaller chunk with logs having timestamp from start and end(both inclusive) func (c *MemChunk) Rebound(start, end time.Time) (Chunk, error) { - // add a nanosecond to end time because the Chunk.Iterator considers end time to be non-inclusive. - itr, err := c.Iterator(context.Background(), start, end.Add(time.Nanosecond), logproto.FORWARD, log.NewNoopPipeline().ForStream(labels.Labels{})) + // add a millisecond to end time because the Chunk.Iterator considers end time to be non-inclusive. + itr, err := c.Iterator(context.Background(), start, end.Add(time.Millisecond), logproto.FORWARD, log.NewNoopPipeline().ForStream(labels.Labels{})) if err != nil { return nil, err } diff --git a/pkg/storage/stores/shipper/compactor/retention/retention.go b/pkg/storage/stores/shipper/compactor/retention/retention.go index e66b9db5d2eb..f67ecd4748fa 100644 --- a/pkg/storage/stores/shipper/compactor/retention/retention.go +++ b/pkg/storage/stores/shipper/compactor/retention/retention.go @@ -152,7 +152,7 @@ func markforDelete(ctx context.Context, tableName string, marker MarkerStorageWr if len(nonDeletedIntervals) > 0 { wroteChunks, err := chunkRewriter.rewriteChunk(ctx, c, nonDeletedIntervals) if err != nil { - return false, false, err + return false, false, fmt.Errorf("failed to rewrite chunk %s for interval %s with error %s", c.ChunkID, nonDeletedIntervals, err) } if wroteChunks {