Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BufferOverflowException triggered by FDBIndexOutput #2345

Closed
jjezra opened this issue Nov 6, 2023 · 1 comment
Closed

Fix BufferOverflowException triggered by FDBIndexOutput #2345

jjezra opened this issue Nov 6, 2023 · 1 comment

Comments

@jjezra
Copy link
Contributor

jjezra commented Nov 6, 2023

No description provided.

@jjezra
Copy link
Contributor Author

jjezra commented Nov 6, 2023

exception="java.nio.BufferOverflowException
at java.base/java.nio.HeapByteBuffer.put(HeapByteBuffer.java:221)
at com.apple.foundationdb.record.lucene.directory.FDBIndexOutput.writeBytes(FDBIndexOutput.java:201)
at org.apache.lucene.codecs.lucene80.Lucene80DocValuesConsumer.addTermsDict(Lucene80DocValuesConsumer.java:753)
at org.apache.lucene.codecs.lucene80.Lucene80DocValuesConsumer.doAddSortedField(Lucene80DocValuesConsumer.java:682)
at org.apache.lucene.codecs.lucene80.Lucene80DocValuesConsumer.addSortedField(Lucene80DocValuesConsumer.java:633)
at org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat$FieldsWriter.addSortedField(PerFieldDocValuesFormat.java:119)
at org.apache.lucene.index.SortedDocValuesWriter.flush(SortedDocValuesWriter.java:150)
at org.apache.lucene.index.DefaultIndexingChain.writeDocValues(DefaultIndexingChain.java:348)
at org.apache.lucene.index.DefaultIndexingChain.flush(DefaultIndexingChain.java:228)
at org.apache.lucene.index.DocumentsWriterPerThread.flush(DocumentsWriterPerThread.java:350)
at org.apache.lucene.index.DocumentsWriter.doFlush(DocumentsWriter.java:476)

jjezra added a commit to jjezra/fdb-record-layer that referenced this issue Nov 6, 2023
…DBIndexOutput

  In the old code, the expression `(currentSize % blockSize) > blockSize` is always false and surely not intended.
jjezra added a commit to jjezra/fdb-record-layer that referenced this issue Nov 7, 2023
…DBIndexOutput

  Attempt to rephrase the expression.
jjezra added a commit to jjezra/fdb-record-layer that referenced this issue Nov 7, 2023
…DBIndexOutput

  Attempt to rephrase the expression.
jjezra added a commit to jjezra/fdb-record-layer that referenced this issue Nov 8, 2023
@jjezra jjezra closed this as completed in 30abe44 Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant