-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add method to check if object is generically writeable in stream (#54936
) When calling scripts in metric aggregation, the returned metric state is passed along to the coordinating node to do the final reduce. However, it is possible the object could contain nested state which is unknown to StreamOutput/StreamInput. This would then result in the node crashing as exceptions are not expected in the middle of serialization. This commit adds a method to StreamOutput that can determine if an object is writeable by the stream. It uses the same logic writeGenericValue, special casing each of the supported collection types to recursively determine if each contained value is itself writeable. relates #54708
- Loading branch information
Showing
3 changed files
with
83 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters