Skip to content

Conversation

@kimchy
Copy link
Member

@kimchy kimchy commented Mar 19, 2014

Instead of using byte arrays, pass the BytesReference to the actual translog file, and use the new copyTo(channel) method to write. This will improve by not potentially having to convert the data to a byte array

Instead of using byte arrays, pass the BytesReference to the actual translog file, and use the new copyTo(channel) method to write. This will improve by not potentially having to convert the data to a byte array
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be just WritableByteChannel instead of GatheringByteChannel?

Copy link
Member Author

Choose a reason for hiding this comment

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

netty channel buffer uses GatheringByteChannel for its getBytes version, and its nice to have the option to write ByteBuffer[]. All relevant actual implementations end up implementing GatheringByteChannel so I thought it just makes sense.

@jpountz
Copy link
Contributor

jpountz commented Mar 19, 2014

+1

@kimchy kimchy closed this in d246008 Mar 19, 2014
kimchy added a commit that referenced this pull request Mar 19, 2014
Instead of using byte arrays, pass the BytesReference to the actual translog file, and use the new copyTo(channel) method to write. This will improve by not potentially having to convert the data to a byte array
closes #5463
@kimchy kimchy deleted the bytes_reference_translog branch August 18, 2014 22:11
@clintongormley clintongormley added :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. and removed :Translog :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. labels Feb 13, 2018
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. >enhancement v1.1.0 v2.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants