Propagate auto_id_timestamp in primary-replica resync#33964
Merged
dnhatn merged 3 commits intoelastic:masterfrom Sep 22, 2018
Merged
Propagate auto_id_timestamp in primary-replica resync#33964dnhatn merged 3 commits intoelastic:masterfrom
dnhatn merged 3 commits intoelastic:masterfrom
Conversation
A follow-up of elastic#33693 to propagate max_seen_auto_id_timestamp in a primary-replica resync.
Collaborator
|
Pinging @elastic/es-distributed |
bleskes
approved these changes
Sep 22, 2018
| for (IndexRequest request : replicationRequests) { | ||
| shards.index(request); // deliver via normal replication | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
I think we miss an assertion to check that all shards are identical?
Member
Author
There was a problem hiding this comment.
We have this check in the teardown but yes, I added an explicit one here :).
| shard.applyIndexOperationOnPrimary(Versions.MATCH_ANY, VersionType.INTERNAL, | ||
| SourceToParse.source(shard.shardId().getIndexName(), "_doc", Integer.toString(i), new BytesArray("{}"), XContentType.JSON), | ||
| IndexRequest.UNSET_AUTO_GENERATED_TIMESTAMP, false); | ||
| randomNonNegativeLong(), randomBoolean()); |
Contributor
There was a problem hiding this comment.
I think we randomly want to have normal ops here (i.e. UNSET_AUTO_GENERATED_TIMESTAMP)
| if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { | ||
| maxSeenAutoIdTimestampOnPrimary = in.readZLong(); | ||
| } else { | ||
| maxSeenAutoIdTimestampOnPrimary = -1; |
Contributor
There was a problem hiding this comment.
can we use UNSET_AUTO_GENERATED_TIMESTAMP?
Member
Author
|
Thanks @bleskes. |
dnhatn
added a commit
that referenced
this pull request
Sep 23, 2018
dnhatn
added a commit
that referenced
this pull request
Sep 23, 2018
kcm
pushed a commit
that referenced
this pull request
Oct 30, 2018
kcm
pushed a commit
that referenced
this pull request
Oct 30, 2018
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.
A follow-up of #33693 to propagate max_seen_auto_id_timestamp in a primary-replica resync.
Relates #33693