ShardSearchFailure#readFrom to set index and shardId#33161
Merged
javanna merged 4 commits intoelastic:masterfrom Aug 27, 2018
Merged
ShardSearchFailure#readFrom to set index and shardId#33161javanna merged 4 commits intoelastic:masterfrom
javanna merged 4 commits intoelastic:masterfrom
Conversation
As part of recent changes made to `ShardOperationFailedException` we introduced `index` and `shardId` members to the base class, but the subclasses are entirely responsible for the serialization of such fields. In the case of `ShardSearchFailure`, we have an additional `SearchShardTarget` instance member which also holds the index and the shardId, hence they get serialized as part of `SearchShardTarget` itself. When de-serializing a `ShardSearchFailure` though, we need to remember to also set the parent class `index` and `shardId` fields otherwise they get lost Relates to elastic#32640
Collaborator
|
Pinging @elastic/es-core-infra |
Contributor
Author
|
I labelled this non-issue as it fixes a bug that was never released, due to changes pushed to master and 6.x. |
jimczi
approved these changes
Aug 27, 2018
| if (in.readBoolean()) { | ||
| shardTarget = new SearchShardTarget(in); | ||
| super.index = shardTarget.getFullyQualifiedIndexName(); | ||
| super.shardId = shardTarget.getShardId().getId(); |
dnhatn
added a commit
that referenced
this pull request
Aug 28, 2018
* master: [Rollup] Better error message when trying to set non-rollup index (#32965) HLRC: Use Optional in validation logic (#33104) Remove unused User class from protocol (#33137) ingest: Introduce the dissect processor (#32884) [Docs] Add link to es-kotlin-wrapper-client (#32618) [Docs] Remove repeating words (#33087) Minor spelling and grammar fix (#32931) Remove support for deprecated params._agg/_aggs for scripted metric aggregations (#32979) Watcher: Simplify finding next date in cron schedule (#33015) Run Third party audit with forbidden APIs CLI (part3/3) (#33052) Fix plugin build test on Windows (#33078) HLRC+MINOR: Remove Unused Private Method (#33165) Remove old unused test script files (#32970) Build analysis-icu client JAR (#33184) Ensure to generate identical NoOp for the same failure (#33141) ShardSearchFailure#readFrom to set index and shardId (#33161)
javanna
added a commit
that referenced
this pull request
Sep 18, 2018
As part of recent changes made to `ShardOperationFailedException` we introduced `index` and `shardId` members to the base class, but the subclasses are entirely responsible for the serialization of such fields. In the case of `ShardSearchFailure`, we have an additional `SearchShardTarget` instance member which also holds the index and the shardId, hence they get serialized as part of `SearchShardTarget` itself. When de-serializing a `ShardSearchFailure` though, we need to remember to also set the parent class `index` and `shardId` fields otherwise they get lost Relates to #32640
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As part of recent changes made to
ShardOperationFailedExceptionwe introducedindexandshardIdmembers to the base class, but the subclasses are entirely responsible for the serialization of such fields. In the case ofShardSearchFailure, we have an additionalSearchShardTargetinstance member which also holds the index and the shardId, hence they get serialized as part ofSearchShardTargetitself. When de-serializing aShardSearchFailurethough, we need to remember to also set the parent classindexandshardIdfields otherwise they get lostRelates to #32640