-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix groupBy caching to work with renamed aggregators #1499
Conversation
.setQuerySegmentSpec(SEG_SPEC) | ||
.setDimFilter(DIM_FILTER) | ||
.setGranularity(GRANULARITY) | ||
.setDimensions(Arrays.<DimensionSpec>asList(new DefaultDimensionSpec("a", "a"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we test with a different output name as well? It's unclear which one should be stored in the cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added test.
f34aa77
to
072d3b4
Compare
@@ -444,6 +448,7 @@ public String apply(DimensionSpec input) | |||
+ limitBytes.length | |||
) | |||
.put(GROUPBY_QUERY) | |||
.put(CACHE_STRATEGY_VER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we spell out version instead of using abbreviations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
👍 |
Issue - while storing results in cache we store the event map which contains aggregator names mapped to values. Now when someone fire same query after renaming aggs, the cache key will be same but the event will contain metric values mapped to older names which leads to wrong results. Fix - modify cache to not store raw event but the actual list of values only. review comments + fix dimension renaming review comment
072d3b4
to
184b12b
Compare
fix groupBy caching to work with renamed aggregators
Issue - while storing results in cache we store the event map which
contains aggregator names mapped to values. Now when someone fire same
query after renaming aggs, the cache key will be same but the event
will contain metric values mapped to older names which leads to wrong
results.
Fix - modify cache to not store raw event but the actual list of values
only.