Skip to content

Inserting multiple records in a transaction with ThreadBucketSelectionStrategy causes LSMTreeIndexCursor to throw java.util.NoSuchElementException during SELECT #1079

@vic0824

Description

@vic0824

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

  1. Create a database
  2. Create a document type with indexes
  3. insert two records in the same transaction
  4. execute a select that should return a value
  5. verify that LSMTreeIndexCursor throws java.util.NoSuchElementException
  6. modify the test case to use the default bucket selection strategy and verify that it passes
  7. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions