Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

FEAT: Unified small/large undo logs #879

Closed
pbalcer opened this issue May 25, 2018 · 0 comments
Closed

FEAT: Unified small/large undo logs #879

pbalcer opened this issue May 25, 2018 · 0 comments
Milestone

Comments

@pbalcer
Copy link
Member

pbalcer commented May 25, 2018

Unified small/large undo logs

Rationale

Currently we have two separate different snapshot undo logs: one for small ranges and one for huge.
The small one combines multiple snapshots into a single allocations by employing a cache of a predefined size. For snapshots exceeding a threshold, we simply allocate an entirely new object for that single range. This leads to a) code duplication, b) space inefficiencies and c) unnecessary logic.

Description

The reason for this separation is mostly due to backward compatibility, but since we are rewriting the lanes anyway, we can once again take a stab at simplifying this code.

We can entirely remove the huge snapshots undo log by removing the small range threshold and extending the logic to:

  • allocate larger undo logs when snapshotting a large range
  • splitting ranges so that the snapshots can be packed in a space efficiently manner

API Changes

The tx.cache.threshold entry point is going to become deprecated after this change. Setting it should have no effect.

Implementation details

To efficiently use the allocation classes mechanism, the size of a cache calculated as follows:
MAX(tx.cache.size, align_up(snapshot_size, tx.cache_size)).

@pbalcer pbalcer added this to the 1.5 milestone May 25, 2018
@pbalcer pbalcer closed this as completed Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant