Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
FEAT: dynamic range cache, undo set simplification #378
Dynamic range cache, undo set simplification
Currently the undo log that contains data snapshots is composed of two vectors: one contains cache for small (<= 32 bytes) data, and the second one contains allocations of snapshots of everything bigger. This mechanism was introduced to reduce the number of allocations performed during a transaction. The problem with this solution is that it introduces additional complexity and benefits only small percentage of workloads.
The proposed change is to unify the behavior of undo log sets and have a single vector that would contain both the caches and whole objects. The cache size would be runtime adjustable and all of the snapshots would be checked against a 'cache-able' threshold which would be expressed as a percentage of the cache size. That value would also be configurable. The cache entries would have dynamically adjustable sizes and would be placed linearly in the allocated cache memory block. Additionally, an option to retain the transaction caches would be present.
Three new ctl entry points would be introduced:
The default values are TBD.
To achieve the goal of streamlining the set undo log code, this change would have to again break backward compatibility because the undo log layout would change.