A fix for bug https://bugs.launchpad.net/tarantool/+bug/790688 "ER_TUPLE_IS_RO should be more rare". Rewrite the transaction processor to optimistically perform changes in memory. In case of an error, transactions are rolled back in order, reverse to the order of execution, and gradually restore the original state of memory. The wal writer therad orchestrates the rollback, by not initiating it until all queries which entered the processing queue before the error has occurred were not added to the rollback queue. While in the state of rollback (i.e. collecting all requests for rollback) new requests are not accepted into the processing queue (see changes in wal_write()). XXX: This patch makes dirty reads possible when we are in rollback, since SELECTs do not enter the wal writer queue and can therefore see changes which later will be rolled back. Since this is a very rare situation, it's considered acceptable to fix this problem in a separate patch (a separate bug will be reported).
Showing
- include/errinj.h 2 additions, 1 deletioninclude/errinj.h
- mod/box/request.m 0 additions, 18 deletionsmod/box/request.m
- mod/box/txn.m 21 additions, 68 deletionsmod/box/txn.m
- src/recovery.m 153 additions, 91 deletionssrc/recovery.m
- test/box/errinj.result 53 additions, 0 deletionstest/box/errinj.result
- test/box/errinj.test 19 additions, 0 deletionstest/box/errinj.test
Loading
Please register or sign in to comment