Configurable isolation levels: read-committed and repeatable-read

Issue #6 resolved
Sridhar Ramachandran repo owner created an issue

User request: Implement something like JDBC's read-committed and repeatable-read isolation levels.

BitsyRetryException is predictably thrown on commits involving changed vertices and edges. But the rules for the version returned on a query is not clear. Sometimes the system returns the version from the last commit, and sometimes it returns the previously queried version in the same transaction. This behavior must be configurable.

Comments (4)

  1. Sridhar Ramachandran reporter

    Introduced 4 new methods to BitsyGraph

    • getDefaultIsolationLevel(), setDefaultIsolationLevel(BitsyIsolationevel): These methods get/set the default isolation level for all future transactions, including the current one:

    • getTxIsolationLevel(), setTxIsolationLevel(BitsyIsolationLevel): These methods set the isolation level for this transaction. Future transactions will continue to use the default isolation level

    The BitsyIsolationLevel is either REPEATABLE_READ or READ_COMMITTED (default). The repeatable read mode guarantees that a vertex or edge previously seen in a transaction will continue to appear the same.

    Link to code changes

  2. Log in to comment