Skip to content

Conversation

@mw-ding
Copy link
Contributor

@mw-ding mw-ding commented Jul 17, 2019

Summary

The reason for the recent Code test failures is that ES snapshot now explicitly throws the following errors if querying ES with version for concurrency control. The esqueue library lives inside code currently uses this stale way to do it. Updating to seq_no and primary_term fixes the problem.

{
   "msg":"[action_request_validation_exception] Validation Failed: 1: internal versioning ca
n not be used for optimistic concurrency control. Please use `if_seq_no` and `if_primary_t
erm` instead;",
   "path":"/.code_internal-worker-queue-2019-07-14/_update/jy7i3gf921vlaf57096
6lf05",
   "query":{
      "type":"_doc",
      "version":1
   },
   "body":"{\"doc\":{\"attempts\":1,\"started_at\":\"2019-07-17T17:25:20.920Z\",\"process_expiration\":\"2019-07-17T18:25:20.920Z\",\"status
\":\"processing\"}}",
   "statusCode":400,
   "response":"{\"error\":{\"root_cause\":[{\"type\":\"action_request_validation_exception\",\"reason\":\"Validation Failed: 1: internal versioni
ng can not be used for optimistic concurrency control. Please use `if_seq_no` and `if_primary_term` instead;\"}],\"type\":\"action_request_validation_exception\",\"reason\":\"Valid
ation Failed: 1: internal versioning can not be used for optimistic concurrency control. Please use `if_seq_no` and `if_primary_term` instead;\"},\"status\":400}"
}

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@elasticmachine
Copy link
Contributor

Pinging @elastic/code

@elasticmachine
Copy link
Contributor

💔 Build Failed

@mw-ding mw-ding changed the title Reenable code tests [Code] Use seq_no and primary_term to do ES concurrency control for EsQueue and reenable code tests Jul 17, 2019
@mw-ding mw-ding marked this pull request as ready for review July 17, 2019 17:39
@mw-ding mw-ding requested review from spalger and zfy0701 July 17, 2019 17:44
@mw-ding
Copy link
Contributor Author

mw-ding commented Jul 17, 2019

Confirmed that this change on ES's end has been merged these 2 days.

A more formal discussion on this can be found here: elastic/elasticsearch#38254

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mw-ding mw-ding merged commit 27f0e82 into elastic:master Jul 17, 2019
@mw-ding mw-ding deleted the fix-code-test branch July 17, 2019 18:39
mw-ding added a commit that referenced this pull request Jul 17, 2019
…sQueue and reenable code tests (#41377) (#41399)

* Revert "disable all code tests (#41363)"

This reverts commit 771d70c.

* Revert "[code] disable failing tests (#41336) (#41338) (#41337)"

This reverts commit 62fedcc.

* [Code] Use seq_no and primary_term to do ES concurrency control for queue
mw-ding added a commit that referenced this pull request Jul 17, 2019
…sQueue and reenable code tests (#41377) (#41398)

* Revert "disable all code tests (#41363)"

This reverts commit 771d70c.

* Revert "[code] disable failing tests (#41336) (#41338) (#41337)"

This reverts commit 62fedcc.

* [Code] Use seq_no and primary_term to do ES concurrency control for queue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants