Skip to content

Interrupted history converter checkpoints its source and blocks its own resume #1256

Closed

Description

@frahlg

The v3.5.1-beta.1 offline converter opens state.db with a writable SQLite connection before computing raw file fingerprints. If a stopped Core left committed frames in state.db-wal, closing the converter after cancellation can checkpoint those frames into the main file. The next attempt rejects its own changed source even though all state tables are logically identical. Read-only inspections can also create an empty SQLite WAL, which differs from an absent file in the current fingerprint.

Observed on a real Pi: the first attempt stopped cleanly on SIGTERM; the next attempt failed with beta source changed since the interrupted conversion. Every state table's count and typed multiset digest matched the verified pre-conversion backup. The main file had grown while the nonempty state WAL had disappeared.

Keep state read-only until the verified destination is selected. Retain the existing journal mode during selection. Normalize absent versus empty SQLite WAL files while still hashing all nonempty WAL bytes. Add a regression with a frozen main/WAL pair, cancellation, byte-preservation checks and successful retry. Keep rejecting actual source changes. Preserve partial copies already affected by the old tool; start a new checked destination instead of overriding the saved fingerprint.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions