Update global checkpoint when increasing primary term on replica#25422
Merged
ywelsch merged 6 commits intoelastic:masterfrom Jun 28, 2017
Merged
Conversation
9 tasks
jasontedor
reviewed
Jun 27, 2017
Member
jasontedor
left a comment
There was a problem hiding this comment.
I left a question and one comment.
| onPermitAcquired.onFailure(new IllegalStateException(message)); | ||
| } else { | ||
| try { | ||
| updateGlobalCheckpointOnReplica(globalCheckpoint); |
Member
There was a problem hiding this comment.
Is it worth skipping this update if the update on term increase was successful?
Contributor
Author
There was a problem hiding this comment.
I found it easier to just do the "double"-update than introducing a boolean. Do you have a preference?
| if (refCount() <= 0) { | ||
| throw new ElasticsearchException("RecoveryStatus is used but it's refcount is 0. Probably a mismatch between incRef/decRef " + | ||
| "calls"); | ||
| "calls"); |
Member
There was a problem hiding this comment.
All changes in this file look cosmetic, can they be reverted?
Contributor
Author
|
Thanks @jasontedor |
64 tasks
jasontedor
added a commit
to ywelsch/elasticsearch
that referenced
this pull request
Jun 28, 2017
* master: Do not swallow exception when relocating Docs: Fix typo for request cache (elastic#25444) Remove implicit 32-bit support [DOCS] reworded to prevent code span rendering glitch (elastic#25442) Disallow multiple concurrent recovery attempts for same target shard (elastic#25428) Update global checkpoint when increasing primary term on replica (elastic#25422) Add backwards compatibility indices for 5.4.3 Add version 5.4.3 after release Update MSI installer images (elastic#25414) Add missing newline at end of SetsTests.java Rename handoff primary context transport handler correct expected thrown exception in mappingMetaData to ElasticsearchParseException (elastic#25410) test: Make many percolator integration tests real integration tests [DOCS] Update docs to use shared attribute file (elastic#25403) Add Javadocs and tests for set difference methods Tests: Add parsing test for AggregationsTests (elastic#25396) test: get upgrade status for all indices Mute SignificantTermsAggregatorTests#testSignificance()
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Jun 28, 2017
…cal-checkpoint * enhance/single-updateshardstate-method: Some cleanup Do not swallow exception when relocating Docs: Fix typo for request cache (elastic#25444) Remove implicit 32-bit support [DOCS] reworded to prevent code span rendering glitch (elastic#25442) Disallow multiple concurrent recovery attempts for same target shard (elastic#25428) Update global checkpoint when increasing primary term on replica (elastic#25422) Add backwards compatibility indices for 5.4.3 Add version 5.4.3 after release Update MSI installer images (elastic#25414) Add missing newline at end of SetsTests.java fix test Rename handoff primary context transport handler Provide single IndexShard method to update state on incoming cluster state
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.
When a replica shard increases its primary term under the mandate of a new primary, it should also update its global checkpoint; this gives us the guarantee that its global checkpoint is at least as high as the new primary and gives a starting point for the primary/replica resync.
Relates to #25355, #10708