Question on whole result caching. I am trying to u...
# dev
s
Question on whole result caching. I am trying to understand why the results of following query is not getting cached on the broker even though we have result set level caching turned on.
Copy code
"dimensions": [
        "dim"
    ],
  "aggregations": [
        {
      "type": "longSum",
      "fieldName": "abc",
      "name": "abc"
        }
    ],
  "postAggregations": [
        {
      "type": "fieldAccess",
      "fieldName": "abc",
      "name": "value"
        }
    ],
  "intervals": [
        "2018-01-02T00:00:00.000Z/2024-03-12T23:59:59.999Z"
    ],
  "limitSpec": { "type": "default", "limit": 2000001
    },
  "queryType": "groupBy",
  "granularity": "day",
  "dataSource": "ds"
}
where as the results of below query get cached:
Copy code
{
  "dimensions": [
    "rejoiner_group"
  ],
  "aggregations": [
    {
      "type": "longSum",
      "fieldName": "accounts_can_stream_cnt_7d",
      "name": "accounts_can_stream_cnt_7d"
    }
  ],
  "intervals": [
    "2018-01-02T00:00:00.000Z/2024-03-12T23:59:59.999Z"
  ],
  "queryType": "groupBy",
  "granularity": "day",
  "dataSource": "productinsights_engagement"
}
The different being that in the first query there is post aggregation and limit.
l
which version of Druid are you on? And how are you determining if caching is working or not?
s
26.0
Attached a debugger and stepped through code 😄
l
oh okay, what’s the condition that’s evaluating false which is preventing result caching? I think we disable caching for groupBy for segment queries\
but that doesn’t seem to be the case
s
This is whole query result cache and not segment level cache on brokers.
l
Thanks for confirming!