ArcadeDB Version:
v23.4.1 (build 8e182cb/1683146081982/main)
OS and JDK Version:
Windows 10 10.0 - OpenJDK 64-Bit Server VM 11.0.12 (Corretto-11.0.12.7.1)
Expected behavior
ArcadeDB stores correctly multiple indexed records inserted in the same transaction, when using ThreadBucketSelectionStrategy
Actual behavior
If ThreadBucketSelectionStrategy is used, and multiple records are inserted in an indexed document type in the same transaction, executing a select on that document type causes LSMTreeIndexCursor to throw java.util.NoSuchElementException
Steps to reproduce
- Create a database
- Create a document type with indexes
- insert two records in the same transaction
- execute a select that should return a value
- verify that LSMTreeIndexCursor throws java.util.NoSuchElementException
- modify the test case to use the default bucket selection strategy and verify that it passes
- modify the test cases adding a commit after each insert and verify that it passes (not sure why)
The attached test case fails because LSMTreeIndexCursor throws java.util.NoSuchElementException when the select is executed.
If the line dtProducts.setBucketSelectionStrategy(new ThreadBucketSelectionStrategy()); is removed, it passes.
If the two lines:
// database.commit();
// database.begin();
are un-commented, it passes (I don't understand why).
testInsertAndSelectWithThreadBucketSelectionStrategy.zip