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.
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.