diff --git a/pkg/storage/stores/shipper/compactor/retention/index.go b/pkg/storage/stores/shipper/compactor/retention/index.go index 9ff9e3cd7175..0c35f651b348 100644 --- a/pkg/storage/stores/shipper/compactor/retention/index.go +++ b/pkg/storage/stores/shipper/compactor/retention/index.go @@ -7,10 +7,14 @@ import ( "strings" "time" - "github.com/cortexproject/cortex/pkg/chunk" "github.com/prometheus/common/model" + "github.com/cortexproject/cortex/pkg/chunk" + util_log "github.com/cortexproject/cortex/pkg/util/log" + "github.com/go-kit/kit/log/level" + "github.com/grafana/loki/pkg/storage" + "github.com/grafana/loki/pkg/storage/stores/shipper" ) const ( @@ -203,6 +207,10 @@ func parseLabelSeriesRangeKey(hashKey, rangeKey []byte) (LabelSeriesRangeKey, bo func validatePeriods(config storage.SchemaConfig) error { for _, schema := range config.Configs { + if schema.IndexType != shipper.BoltDBShipperType { + level.Warn(util_log.Logger).Log("msg", fmt.Sprintf("custom retention is not supported for store %s, no retention will be applied for schema entry with start date %s", schema.IndexType, schema.From)) + continue + } if schema.IndexTables.Period != 24*time.Hour { return fmt.Errorf("schema period must be daily, was: %s", schema.IndexTables.Period) }