Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

multi-tenancy log compaction #553

Merged
merged 9 commits into from
Jul 26, 2023
Merged

multi-tenancy log compaction #553

merged 9 commits into from
Jul 26, 2023

Conversation

MarinPostma
Copy link
Contributor

This PR introduces a compaction queue and a snapshot store, to handle replication log compaction.

When a database need to perform a compaction, it first swaps it current replication log file with a new log. The log to compact is placed in the snapshot_queue directory, and it is registered with the persistent compaction queue. A separate thread pop tasks out of the queue, performs the compaction of the log into a partial snapshot, moved the snapshot into the snapshots diretory, and registers the snapshot with the snapshot store.

The SnapshotStore::locate method allows for efficient retrieval of a snapshot file for a given database & frame_no.

@MarinPostma MarinPostma changed the base branch from main to multi-tenancy July 26, 2023 13:03
@MarinPostma MarinPostma merged commit abace0d into multi-tenancy Jul 26, 2023
@MarinPostma MarinPostma mentioned this pull request Jul 26, 2023
21 tasks
@MarinPostma MarinPostma changed the title mt log compactor multi-tenancy log compaction Jul 26, 2023
@MarinPostma MarinPostma deleted the mt-log-compactor branch August 25, 2023 13:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant