Construct dummy request for doc level monitor fanout request on serde failure #806#807
Construct dummy request for doc level monitor fanout request on serde failure #806#807eirsep wants to merge 7 commits intoopensearch-project:mainfrom
Conversation
… failure Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
f0a7d8a to
19a6af8
Compare
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
| 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.
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.
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.
added a flag to indicate serialization failed if any of the safeRead*() methods fail
…n out request Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
d30dac5
| concreteIndicesSeenSoFar: List<String>, | ||
| workflowRunContext: WorkflowRunContext? | ||
| workflowRunContext: WorkflowRunContext?, | ||
| hasSerializationFailed: Boolean? = null |
There was a problem hiding this comment.
Should this be passable via a constructor?
| } | ||
| } | ||
| return indexExecutionContext | ||
| } catch (e: EOFException) { |
There was a problem hiding this comment.
Should we set serializationFailedFlag = true in this catch as well?
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
…t for Doc Level monitor fanout request Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
| // read and discard bytes until stream is entirely consumed | ||
| try { | ||
| sin.readByte() | ||
| } catch (_: EOFException) { |
There was a problem hiding this comment.
should we log here as well?
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
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.