You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the RocksDB documentation, for OptimisticTransactionDB:
commit: will commit changes unless there is a conflict, in which case it will return Busy
prepare: writes to the WAL, so commit is simple, as the cost of making rollback more costly; it doesn't say that it would return Busy if there are conflicts
If commit is the one which returns Busy then this is at odds with how STM expects it to work. Also, in STM we do the database prepare first, and the in-memory key checks second. We could do the other way around, though:
locks the keys in the STM transaction first, detect conflicts there
if a conflict is found, rollback the DB
if there are no conflicts, then try_commit the database
if try_commit returned true, write to the locked in-memory places
if try_commit returned false, release the locks and try again
The text was updated successfully, but these errors were encountered:
A followup on #287
According to the RocksDB documentation, for
OptimisticTransactionDB
:commit
: will commit changes unless there is a conflict, in which case it will returnBusy
prepare
: writes to the WAL, so commit is simple, as the cost of makingrollback
more costly; it doesn't say that it would returnBusy
if there are conflictsSee:
If
commit
is the one which returnsBusy
then this is at odds with how STM expects it to work. Also, in STM we do the database prepare first, and the in-memory key checks second. We could do the other way around, though:try_commit
the databasetry_commit
returnedtrue
, write to the locked in-memory placestry_commit
returnedfalse
, release the locks and try againThe text was updated successfully, but these errors were encountered: