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] Model should defend against times earlier than epoch 0 #394
Comments
I saw the same error as above it's reproducible with the following:
|
I've tracked down the problem. It's that we unconditionally call |
Similar to the fix for state and quantiles in elastic#437, if no input is received and time is not advanced then there is no need to write model size stats when the autodetect process exits. Doing this can actually cause a problem for a job that has never ever seen any input, as the unnecessary model size stats were written with a negative timestamp. This change also adds an extra defensive check to prevent that ever happening, although the only situation when it is thought to be possible should be prevented by the first change. Fixes elastic#394
Similar to the fix for state and quantiles in #437, if no input is received and time is not advanced then there is no need to write model size stats when the autodetect process exits. Doing this can actually cause a problem for a job that has never ever seen any input, as the unnecessary model size stats were written with a negative timestamp. This change also adds an extra defensive check to prevent that ever happening, although the only situation when it is thought to be possible should be prevented by the first change. Fixes #394
I saw this in a Java test log:
However, this did not actually fail any test.
It shows that a model size stats document contained an epoch time of -3600 seconds = -3600000 milliseconds. The Java side cannot cope with this. We should change the C++ code so that it does not create such documents.
A request to generate results for times before the epoch could fail the job, which would then cause a test failure on the Java side that we could fix.
The text was updated successfully, but these errors were encountered: