Skip to content

Druid Broker Result Level Cache Not Working Properly When Different Query Intervals Cover the Same Set of Segments #7302

@lxqfy

Description

@lxqfy

Druid Broker Result Level Cache Not Working Properly When Different Query Intervals Cover the Same Set of Segments.

Affected Version

0.13.0-incubating

Description

We have a segment with Segment Granularity of DAY and Query Granularity of HOUR.
When we send the same queries with only a different query interval, the result level cache will return the wrong result.

Example: QueryA and QueryB has same query body.
QueryA Interval: 2019-03-15T14:00:00/ 2019-03-16T14:00:00
QueryB Interval: 2019-03-15T18:00:00/ 2019-03-16T18:00:00

Involved Segments:
QueryA: segment2019-03-15_2019-03-16
QueryB: segment2019-03-15_2019-03-16

Response:
QueryA gets the correct result.
QueryB gets the result of QueryA.

Some Investigations:
Result level cache will use the query without interval as key. When the key match, the E-Tag is used to check if the cached result should be returned. However, E-Tag is only calculated with the Identifiers of involved segments.

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