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
[ML] Addressing bug streaming DatafeedConfig aggs from (<= 6.5.4) -> 6.7.0 #40610
[ML] Addressing bug streaming DatafeedConfig aggs from (<= 6.5.4) -> 6.7.0 #40610
Conversation
Pinging @elastic/ml-core |
run elasticsearch-ci/2 |
Since |
The way |
@@ -29,7 +30,34 @@ | |||
"job_id":"old-cluster-datafeed-job", | |||
"indices":["airline-data"], | |||
"types":["response"], | |||
"scroll_size": 2000 | |||
"scroll_size": 2000, | |||
"aggregations": { |
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.
Since the wire transport is quite different for null
and non-null
aggregations I think it would be good to have a second datafeed that doesn't use aggregations. I will push another test to this PR soon.
I pushed a commit adding aggregations to the datafeeds in the full cluster restart tests. This bug would not have appeared in a full cluster restart scenario but it is worth updating the tests. |
The wire serialisation is different for null/non-null aggs, so it's worth testing both cases.
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.
LGTM
I think Jenkins lost the elasticsearch-ci/packaging-sample request because the one related to the second commit was still queuing when I pushed the third commit - trying again. Jenkins run elasticsearch-ci/packaging-sample |
run elasticsearch-ci/packaging-sample |
1 similar comment
run elasticsearch-ci/packaging-sample |
@elasticmachine run elasticsearch-ci/packaging-sample |
…6.7.0 (elastic#40610) * Addressing stream failure and adding tests to catch such in the future * Add aggs to full cluster restart tests * Test BWC for datafeeds with and without aggs The wire serialisation is different for null/non-null aggs, so it's worth testing both cases.
…6.7.0 (elastic#40610) * Addressing stream failure and adding tests to catch such in the future * Add aggs to full cluster restart tests * Test BWC for datafeeds with and without aggs The wire serialisation is different for null/non-null aggs, so it's worth testing both cases.
…6.7.0 (elastic#40610) * Addressing stream failure and adding tests to catch such in the future * Add aggs to full cluster restart tests * Test BWC for datafeeds with and without aggs The wire serialisation is different for null/non-null aggs, so it's worth testing both cases.
…6.7.0 (elastic#40610) (elastic#40660) * Addressing stream failure and adding tests to catch such in the future * Add aggs to full cluster restart tests * Test BWC for datafeeds with and without aggs The wire serialisation is different for null/non-null aggs, so it's worth testing both cases.
…6.7.0 (#40656) * [ML] Addressing bug streaming DatafeedConfig aggs from (<= 6.5.4) -> 6.7.0 (#40610) * Addressing stream failure and adding tests to catch such in the future * Add aggs to full cluster restart tests * Test BWC for datafeeds with and without aggs The wire serialisation is different for null/non-null aggs, so it's worth testing both cases. * fixing bwc test, removal of _xpack url path * Fixing BWC test for datafeed
…6.7.0 (#40659) * [ML] Addressing bug streaming DatafeedConfig aggs from (<= 6.5.4) -> 6.7.0 (#40610) * Addressing stream failure and adding tests to catch such in the future * Add aggs to full cluster restart tests * Test BWC for datafeeds with and without aggs The wire serialisation is different for null/non-null aggs, so it's worth testing both cases. * Fixing bwc test, removing types * Fixing BWC test for datafeed * Update 40_ml_datafeed_crud.yml * Update build.gradle
…6.7.0 (elastic#40610) (elastic#40660) * Addressing stream failure and adding tests to catch such in the future * Add aggs to full cluster restart tests * Test BWC for datafeeds with and without aggs The wire serialisation is different for null/non-null aggs, so it's worth testing both cases.
There is a bug when serializing DatafeedConfgs with aggregations from earlier versions of <= 6.5.4 to 6.7.0.
When 6.5.4 or earlier version writes to the out stream, it writes aggs in the following way
Stream:
-> stuff before
-> boolean:True
-> parsedAggs Object
-> stuff after
When 6.7.0 reads from the 6.5.4 or earlier version stream, it reads in the following way
-> stuff before
-> boolean:True
-> boolean: <--- Starts corrupting stream
-> read ParsedAggs < --- fails due to reading the "second boolean"
There is a similar situation when 6.7.0 writes out aggregations, it writes two
true
boolean values to the stream before writing the parsed aggs.I have tested upgrades from 6.6.0 -> 6.7.0 and the issue does not occur.