Skip to content

Reject OCC and updates on seq-no-disabled indices#143746

Merged
fcofdez merged 13 commits intoelastic:mainfrom
fcofdez:reject-occ-for-seq-no-disabled-indices
Mar 9, 2026
Merged

Reject OCC and updates on seq-no-disabled indices#143746
fcofdez merged 13 commits intoelastic:mainfrom
fcofdez:reject-occ-for-seq-no-disabled-indices

Conversation

@fcofdez
Copy link
Copy Markdown
Contributor

@fcofdez fcofdez commented Mar 6, 2026

Indices with sequence numbers disabled cannot support
optimistic concurrency control or updates. Reject these
operations early in InternalEngine and UpdateHelper with
dedicated exception types (OCCNotSupportedException,
UpdateNotSupportedException) returning HTTP 400.

Relates to #136305

Indices with sequence numbers disabled cannot support
optimistic concurrency control or updates. Reject these
operations early in InternalEngine and UpdateHelper with
dedicated exception types (OCCNotSupportedException,
UpdateNotSupportedException) returning HTTP 400.
@fcofdez fcofdez added >non-issue :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. Team:Distributed Meta label for distributed team. v9.4.0 labels Mar 6, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@fcofdez fcofdez requested review from burqen, romseygeek and tlrx March 6, 2026 16:41
@fcofdez
Copy link
Copy Markdown
Contributor Author

fcofdez commented Mar 6, 2026

@elasticmachine update branch

Copy link
Copy Markdown
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM, I left some comments.


public void testSingleUpdateOnSeqNoDisabledIndexIsRejected() {
assumeTrue("Test requires disable_sequence_numbers feature flag", IndexSettings.DISABLE_SEQUENCE_NUMBERS_FEATURE_FLAG);
internalCluster().ensureAtLeastNumDataNodes(1);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: I think we can let the test framework set up a random number of nodes for the test here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed in 036835d

);
ensureGreen("test");

prepareIndex("test").setId("1").setSource("value", "original").get();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: should we assert CREATED?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in ddbf2ff

@fcofdez
Copy link
Copy Markdown
Contributor Author

fcofdez commented Mar 9, 2026

@elasticmachine update branch

@fcofdez fcofdez merged commit fa6c3f7 into elastic:main Mar 9, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >non-issue Team:Distributed Meta label for distributed team. v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants