Skip to content

Backup leaves the journal behind - #1260

Merged
noha merged 2 commits into
mainfrom
backup-leaves-the-journal-behind
Sep 15, 2026
Merged

noha merged 2 commits into
mainfrom
backup-leaves-the-journal-behind

Conversation

@noha

@noha noha commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

noha and others added 2 commits September 15, 2026 21:47
A backup is written by walking the source at a pinned databaseVersion and writing
fresh object and index files into a freshly initialized target. The target's
positions are therefore its own, and the source's journal entries describe
positions in the source.

They were copied all the same, file for file. Measured on a database of forty
commits, the fragments were half of the copy - and deleting them from it left
every value readable. On the ApptiveGrid estate that is half the backup volume and
half the transfer, five copies per database per night, for history that cannot be
replayed into the copy that holds it.

An option rather than a removal: a copy meant to be inspected rather than read may
want the history, and a caller that relied on the fragments being there should be
able to say so instead of finding out.

The target's own fragments are cleared only when the source's are coming in. That
deletion exists because a fresh target brings a first fragment whose name collides
with the source's first one; with nothing coming in there is nothing to collide
with, and that fragment is exactly what a new database should have.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noha
noha requested a review from MarcusDenker September 15, 2026 19:56
@noha
noha merged commit 4694b96 into main Sep 15, 2026
@noha
noha deleted the backup-leaves-the-journal-behind branch September 15, 2026 20:10

@MarcusDenker MarcusDenker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok

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

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants