Skip to content

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

## Summary

Resolves elastic#226518

Add `seqNoPrimaryTerm: true,` in V2 and ZDT so it uses the optimistic
concurrency logic. Also added some tests for this.

While doing this, some tests broke, these tests were moving a SO from
single namespace to multi namespace. We can't use the optimistic
concurrency logic in this case because we are using the `seq no` and
`primary term` from the old SO, so when it tries to create a new SO it
will fail. That's why we are checking if `document._id !==
document._source.originId;` before deciding if we'll use the optimistic
concurrency logic.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: Rudolf Meijering <[email protected]>
(cherry picked from commit a5805f2)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Sep 1, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) September 1, 2025 16:51
@elasticmachine
Copy link
Contributor

elasticmachine commented Sep 1, 2025

💔 Build Failed

Failed CI Steps

History

cc @jesuswr

@kibanamachine kibanamachine merged commit 845e88e into elastic:9.0 Sep 2, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants