Move CAS operations in TokenService to sequence numbers#38311
Merged
bleskes merged 1 commit intoelastic:masterfrom Feb 4, 2019
Merged
Move CAS operations in TokenService to sequence numbers#38311bleskes merged 1 commit intoelastic:masterfrom
bleskes merged 1 commit intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-security |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/1 please. |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/1 |
| updateRequest.setIfPrimaryTerm(response.getPrimaryTerm()); | ||
| } else { | ||
| updateRequest.setVersion(response.getVersion()); | ||
| } |
Contributor
There was a problem hiding this comment.
Small suggestion to make the condition tight proof (an assert could also work).
if (clusterService.state().nodes().getMinNodeVersion().onOrAfter(Version.V_6_7_0)
&& response.getSeqNo() != UNASSIGNED_SEQ_NO) {
updateRequest.setIfSeqNo(response.getSeqNo());
updateRequest.setIfPrimaryTerm(response.getPrimaryTerm());
} else {
updateRequest.setVersion(response.getVersion());
}
There might be guarantees in other places in the code, I haven't looked for it thoroughly, you know better.
Contributor
Author
There was a problem hiding this comment.
@albertzaharovits sorry, I didn't see this version of the comment before merging. I'll add it in a follow up.
Contributor
Author
bleskes
added a commit
that referenced
this pull request
Feb 4, 2019
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Feb 4, 2019
…round-sync-6.x * elastic/6.x: Fix testRestoreIncreasesPrimaryTerms on 6.x (elastic#38314) SQL: Remove exceptions from Analyzer (elastic#38260) (elastic#38287) SQL: Move metrics tracking inside PlanExecutor (elastic#38259) (elastic#38288) Backport of elastic#38311: Move TokenService to seqno powered cas Handle scheduler exceptions (elastic#38183) Mute MlMigrationFullClusterRestartIT#testMigration (elastic#38316) 6.x Backport of elastic#38278: Move ML Optimistic Concurrency Control to Seq No Cleanup construction of interceptors (elastic#38296) Throw if two inner_hits have the same name (elastic#37645) (elastic#38194) AsyncTwoPhaseIndexerTests race condition fixed elastic#38195 Backport#37830 Enable SSL in reindex with security QA tests (elastic#38293) Ensure ILM policies run safely on leader indices (elastic#38140) Introduce ssl settings to reindex from remote (elastic#38292) Fix ordering problem in add or renew lease test (elastic#38281) Mute ReplicationTrackerRetentionLeaseTests#testAddOrRenewRetentionLease (elastic#38276) Fix NPE in Logfile Audit Filter (elastic#38120) (elastic#38271) Enable trace log in FollowerFailOverIT (elastic#38148) SQL: Generate relevant error message when grouping functions are not used in GROUP BY (elastic#38017)
bleskes
added a commit
to bleskes/elasticsearch
that referenced
this pull request
Feb 7, 2019
These were suggested by @albertzaharovits in elastic#38311 (review)
bleskes
added a commit
that referenced
this pull request
Feb 11, 2019
These were suggested by @albertzaharovits in #38311 (review)
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.
Relates #37872
Relates #10708