-
Notifications
You must be signed in to change notification settings - Fork 106
Construct dummy request for doc level monitor fanout request on serde failure #806 #807
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
base: main
Are you sure you want to change the base?
Conversation
… failure Signed-off-by: Surya Sashank Nistala <[email protected]>
f0a7d8a
to
19a6af8
Compare
Signed-off-by: Surya Sashank Nistala <[email protected]>
sin.readBoolean() | ||
} catch (e: Exception) { | ||
log.error("Error parsing boolean in Doc level monitor fanout request", e) | ||
false |
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.
How does it affect execution if we end up with the default value for these fields? It seems like we need some way to signal that the fanout should not execute if we encounter a deserialization error like this
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 are not gonna use these fields. the alerting plugin will look for null check on index execution context opensearch-project/alerting#1815
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 a flag to indicate serialization failed if any of the safeRead*() methods fail
…n out request Signed-off-by: Surya Sashank Nistala <[email protected]>
d30dac5
concreteIndicesSeenSoFar: List<String>, | ||
workflowRunContext: WorkflowRunContext? | ||
workflowRunContext: WorkflowRunContext?, | ||
hasSerializationFailed: Boolean? = null |
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.
Should this be passable via a constructor?
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.
Will update
} | ||
} | ||
return indexExecutionContext | ||
} catch (e: EOFException) { |
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.
Should we set serializationFailedFlag = true
in this catch as well?
Signed-off-by: Surya Sashank Nistala <[email protected]>
…t for Doc Level monitor fanout request Signed-off-by: Surya Sashank Nistala <[email protected]>
Signed-off-by: Surya Sashank Nistala <[email protected]>
// read and discard bytes until stream is entirely consumed | ||
try { | ||
sin.readByte() | ||
} catch (_: EOFException) { |
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.
should we log here as well?
Signed-off-by: Surya Sashank Nistala <[email protected]>
Description
In order to handle failures in doc level monitor fanout request construction during upgrades when nodes from old and new versions co-exist we create a dummy request if serde fails.
This situation occurs as new fields have been added without version check in monitor object which causes serde failures when doc level monitor execution starts on a node in older version and fans out to a node on a newer version with different serialization code.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.