Previously, the data structure used for the global MyRocks transaction list was
std::multiset. It was not optimal, for instance, it did not need to be sorted
nor multi-. Replace it with an intrusive doubly linked list. The list pointers
are stored directly in the transaction object, which has the advantage that
adding and removing the transaction from the global list does not need to
maintain any extra nodes on heap, shortening the code path and improving the
data locality even if the latter still remains poor due to linked list data
structure. This change also improves the complexity of insertion and removal
operations from logarithmic to constant.
At the same time split out the global list methods and fields from
Rdb_transaction class to a new Rdb_transaction_list class.
Previously, the data structure used for the global MyRocks transaction list was std::multiset. It was not optimal, for instance, it did not need to be sorted nor multi-. Replace it with an intrusive doubly linked list. The list pointers are stored directly in the transaction object, which has the advantage that adding and removing the transaction from the global list does not need to maintain any extra nodes on heap, shortening the code path and improving the data locality even if the latter still remains poor due to linked list data structure. This change also improves the complexity of insertion and removal operations from logarithmic to constant.
At the same time split out the global list methods and fields from Rdb_transaction class to a new Rdb_transaction_list class.