Skip to content

Conversation

@kim
Copy link
Contributor

@kim kim commented Sep 24, 2025

The DurabilityProvider trait was introduced to enable the HostController to procure an alternative Durability impl from an external source.

It is also useful to be able to instantiate a SnapshotWorker externally, in order to subscribe to snapshot creation events without access to the RelationalDB instance it is operating on.

At a later stage, we may also use it to control the snapshot frequency externally.

This patch thus reframes the trait as PersistenceProvider, whose job is to provide persistence-related services.

Also separates snapshot creation and compression of older snapshots, and adds instrumentation to gather timing information for both.

Expected complexity level and risk

1.5

Testing

Not a functional change, existing tests should cover that.

@kim kim requested review from coolreader18 and gefjon September 24, 2025 11:03
Copy link
Contributor

@gefjon gefjon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Love the clear motivating comments.

kim added 2 commits September 25, 2025 14:22
The `DurabilityProvider` trait was introduced to enable the
`HostController` to procure an alternative `Durability` impl from an
external source.

It is also useful to be able to instantiate a `SnapshotWorker`
externally, in order to subscribe to snapshot creation events without
access to the `RelationalDB` instance it is operating on.

At a later stage, we may also use it to control the snapshot frequency
externally.

This patch thus reframes the trait as `PersistenceProvider`, whose job
is to provide persistence-related services.

Also separates snapshot creation and compression of older snapshots, and
adds instrumentation to gather timing information for both.
@kim kim force-pushed the kim/persistence-provider branch from 32eb7ce to fd79d2f Compare September 25, 2025 12:23
@kim kim enabled auto-merge September 25, 2025 12:24
@kim kim added this pull request to the merge queue Sep 25, 2025
Merged via the queue into master with commit 2b61190 Sep 25, 2025
24 of 25 checks passed
@kim kim deleted the kim/persistence-provider branch September 25, 2025 13:24
kim added a commit that referenced this pull request Sep 25, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 25, 2025
…3281)" (#3293)

This reverts commit 2b61190.

An accident happened, and the patch contains changes that were intended
for a separate PR.
Perhaps better to start over.
github-merge-queue bot pushed a commit that referenced this pull request Oct 1, 2025
The `DurabilityProvider` trait was introduced to enable the
`HostController` to procure an alternative `Durability` impl from an
external source.

It is also useful to be able to instantiate a `SnapshotWorker`
externally, in order to subscribe to snapshot creation events without
access to the `RelationalDB` instance it is operating on.

At a later stage, we may also use it to control the snapshot frequency
externally.

This patch thus reframes the trait as `PersistenceProvider`, whose job
is to provide persistence-related services.

Also separates snapshot creation and compression of older snapshots, and
adds instrumentation to gather timing information for both.

# Description of Changes

Re-submit of #3281 (reverted by #3293), with only the intended changes.

# Expected complexity level and risk

1.5

# Testing

No functional changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants