Skip to content

Conversation

@bleskes
Copy link
Contributor

@bleskes bleskes commented Feb 4, 2019

Relates #37872
Relates #10708

@bleskes bleskes added >enhancement v7.0.0 :Security/Security Security issues without another label v6.7.0 labels Feb 4, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@bleskes
Copy link
Contributor Author

bleskes commented Feb 4, 2019

@elasticmachine run elasticsearch-ci/1 please.

@bleskes
Copy link
Contributor Author

bleskes commented Feb 4, 2019

@elasticmachine run elasticsearch-ci/1

updateRequest.setIfPrimaryTerm(response.getPrimaryTerm());
} else {
updateRequest.setVersion(response.getVersion());
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@albertzaharovits sorry, I didn't see this version of the comment before merging. I'll add it in a follow up.

Copy link
Contributor

@albertzaharovits albertzaharovits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bleskes bleskes merged commit e49b593 into elastic:master Feb 4, 2019
@bleskes bleskes deleted the cas_token_service branch February 4, 2019 14:25
@bleskes
Copy link
Contributor Author

bleskes commented Feb 4, 2019

Thx @albertzaharovits

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
bleskes added a commit that referenced this pull request Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants