Skip to content

Disable sequence numbers for TSDB in release builds#145737

Merged
kkrik-es merged 11 commits intoelastic:mainfrom
kkrik-es:tsdb/disable-seqno-remove-ff
Apr 7, 2026
Merged

Disable sequence numbers for TSDB in release builds#145737
kkrik-es merged 11 commits intoelastic:mainfrom
kkrik-es:tsdb/disable-seqno-remove-ff

Conversation

@kkrik-es
Copy link
Copy Markdown
Member

@kkrik-es kkrik-es commented Apr 6, 2026

This change allows for trimming sequence numbers when they are no longer needed for replication, with substantial savings in storage and cpu for segment merging. The downside is that Optimistic Concurrency Control (OCC) gets disabled. This is a reasonable tradeoff for metrics applications, where updates and deletes are rather infrequent and hardly need isolation guarantees. Still, if OCC is important for a given application, sequence numbers can be restored by setting [index.disable_sequence_numbers:true].

Fixes #136305

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @kkrik-es, I've created a changelog YAML for you. Note that since this PR is labelled >breaking, you need to update the changelog YAML to fill out the extended information sections.

@kkrik-es kkrik-es marked this pull request as ready for review April 6, 2026 13:19
@kkrik-es kkrik-es requested a review from a team as a code owner April 6, 2026 13:19
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Copy Markdown
Contributor

@yannis-roussos yannis-roussos left a comment

Choose a reason for hiding this comment

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

Thank you @kkrik-es, the explanation on the changelog looks great and fully covers the change, impact and how to mitigate

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

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.

A couple of nits around wording, but no need for another review. I take it that the plan is to remove the feature flag in a separate PR?

kkrik-es and others added 4 commits April 7, 2026 10:58
Co-authored-by: Alan Woodward <romseygeek@gmail.com>
Co-authored-by: Alan Woodward <romseygeek@gmail.com>
# Conflicts:
#	server/src/main/java/org/elasticsearch/index/IndexVersions.java
# Conflicts:
#	server/src/main/java/org/elasticsearch/index/IndexVersions.java
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

🔍 Preview links for changed docs

⏳ Building and deploying preview... View progress

This comment will be updated with preview links when the build is complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@kkrik-es kkrik-es merged commit 12d6eaa into elastic:main Apr 7, 2026
35 checks passed
mromaios pushed a commit to mromaios/elasticsearch that referenced this pull request Apr 9, 2026
* Disable sequence numbers for TSDB in release builds

* relax validation

* [CI] Auto commit changes from spotless

* Update docs/changelog/145737.yaml

* breaking

* breaking tag

* Update 145737.yaml

* Update docs/changelog/145737.yaml

Co-authored-by: Alan Woodward <romseygeek@gmail.com>

* Update docs/changelog/145737.yaml

Co-authored-by: Alan Woodward <romseygeek@gmail.com>

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Alan Woodward <romseygeek@gmail.com>
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.

Trim _seq_no doc values when no longer needed

5 participants