-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Simplify computation of resets in rate aggregation #134700
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
Conversation
2c8a127
to
ce36555
Compare
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
while (j < count) { | ||
mergedTimestamps[k] = ts.getLong(tsFirst + j); | ||
mergedValues[k++] = vs.getLong(vsFirst + j++); | ||
assert count % 2 == 0 : "expected even number of values for intervals, got " + count + " in " + ts; |
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.
Sorry I missed this, why is this the case?
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.
We serialize two values for each interval and here assert that the intervals have been serialized correctly.
} else { | ||
timestamps.appendLong(state.timestamps[0]); | ||
values.appendLong(state.values[0]); | ||
// don't combine intervals until final as we might have overlapping intervals from other indices |
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.
I'm wondering, does this mean that we need to send all the data to the coordinating node? Or, we still reduce in the data nodes, before collecting the per-shard data in the coordinating node?
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.
I updated the comments. We still reduce data points in each shard to a single interval (t1, v1, t2, v2), but we no longer combine intervals across shards until the final phase
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.
Make sure you run the randomized test a few times :)
LG, thanks Nhat. Just a few minor questions, mostly orthogonal.
Thanks Kostas! |
This change reworks the computation of resets to remove the need for using delta.
This change reworks the computation of resets to remove the need for using delta.