Skip to content

Improper topN caching when sorting by postaggregator  #3719

@gianm

Description

@gianm

When a topN is sorting by a postaggregator, the postaggregator name is part of the query cache key but the definition is not. But, the postaggregator should be part of the cache key too, since it's used to determine which result rows to keep for a particular segment in the cache. If the postaggregator is redefined but keeps the same name, the query improperly uses previously cached results.

I think fixing this for real will require adding a getCacheKey method to PostAggregators.

If we want to hold off on that until 0.10.0 then we could work around it in the meantime by disabling caching for any topN query that sorts on a postaggregator. But this has a performance cost that could hit more people than the bug does.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions