Skip to content

is there a plan to optimize cache when ooo is supported #5039

Open
@haplone

Description

@haplone

Is your feature request related to a problem? Please describe.
When Support out of order samples ingestion is supported, the current cache strategy will have bug, if we search samples in out_of_order_time_window and cache , while ingest samples in out_of_order_time_window.

Describe the solution you'd like
If search time range in out_of_order_time_window, we should reduce the ttl of result cache or just not cache it?
If we reduce the ttl, we need to add ttl in Store api https://github.com/cortexproject/cortex/blob/master/pkg/chunk/cache/cache.go#L21

type Cache interface {
	Store(ctx context.Context, key []string, buf [][]byte)
	Fetch(ctx context.Context, keys []string) (found []string, bufs [][]byte, missing []string)
	Stop()
}

but as we use type tiered []Cache https://github.com/cortexproject/cortex/blob/master/pkg/chunk/cache/tiered.go#L28 , makes the optimize quite complex , will we consider to make a big optimize for cache ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions