diff --git a/head.go b/head.go index 00f51e0077..82a3459bd1 100644 --- a/head.go +++ b/head.go @@ -249,9 +249,6 @@ func (h *Head) ReadWAL() error { func (h *Head) Truncate(mint int64) error { initialize := h.MinTime() == math.MinInt64 - if mint%h.chunkRange != 0 { - return errors.Errorf("truncating at %d not aligned", mint) - } if h.MinTime() >= mint { return nil } diff --git a/head_test.go b/head_test.go index b7603e78ee..31713b9c1c 100644 --- a/head_test.go +++ b/head_test.go @@ -187,8 +187,8 @@ func TestHead_Truncate(t *testing.T) { } s4.chunks = []*memChunk{} - // Truncation must be aligned. - require.Error(t, h.Truncate(1)) + // Truncation need not be aligned. + require.NoError(t, h.Truncate(1)) h.Truncate(2000)