Skip to:
Consider the following test case:
When executing it, we get this issue:
This is what causes the problem.
When calling the getQueryRegionStatistics, this is what is being fetched:
getQueryRegionStatistics
l2CacheStatsMap.getOrCompute( regionName, this::computeQueryRegionStatistics );
And, the computeQueryRegionStatistics will be called and will cache a value of null because the region is not available yet:
computeQueryRegionStatistics
null
final QueryResultsCache regionAccess = cache.getQueryResultsCacheStrictly( regionName );
Returns null at this point.
That region is built upon executing the query later on.
What I saw that worked was something like this:
Executing this before calling getQueryRegionStatistics("default-query-results-region") fixed the problem.
getQueryRegionStatistics("default-query-results-region")
Consider the following test case:
When executing it, we get this issue:
This is what causes the problem.
When calling the
getQueryRegionStatistics
, this is what is being fetched:l2CacheStatsMap.getOrCompute( regionName, this::computeQueryRegionStatistics );
And, the
computeQueryRegionStatistics
will be called and will cache a value ofnull
because the region is not available yet:final QueryResultsCache regionAccess = cache.getQueryResultsCacheStrictly( regionName );
Returns
null
at this point.That region is built upon executing the query later on.
What I saw that worked was something like this:
Executing this before calling
getQueryRegionStatistics("default-query-results-region")
fixed the problem.