Skip to content

Conversation

@original-brownbear
Copy link
Contributor

@original-brownbear original-brownbear commented May 7, 2025

From all the investigating of indexing as of late :) this serves two purposes:

Save allocation of pages under the lock for low write-rate translogs and also make copying large documents a little less likely. Also it removes a dependency on BigArrays which is always nice :)

This really is just one small step though, there's a lot more cleanup that can (and should) happen here to avoid more copies. The current implementation literally copies each written byte at least 3 times (from the Operation to the first buffer, first buffer to second buffer in add, and then another round to the direct IO buffer when writing), that's just a needless waste of cycles and memory bandwidth.

This serves two purposes:

Save allocation of pages under the lock for low write-rate translogs
and also make copying large documents a little less likely.
@original-brownbear original-brownbear requested a review from a team as a code owner May 7, 2025 15:00
@original-brownbear original-brownbear added >non-issue :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. labels May 7, 2025
@elasticsearchmachine elasticsearchmachine added Team:Distributed Indexing Meta label for Distributed Indexing team v9.1.0 labels May 7, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. >non-issue Team:Distributed Indexing Meta label for Distributed Indexing team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants