Replikation fortsetzen, wenn ein Snapshot währenddessen gelöscht wird #37

Closed
thorsten.spille wants to merge 0 commits from thorsten.spille/feature-7-skip-deleted into main AGit

Setzt #7 um.

Problem (Test-VM, echtes ZFS, ohne Holds)

Während des Deltas daily-01 → daily-02 löscht die Rotation den geplanten daily-03. Heute: 02 → 03 scheitert, 03 wird trotzdem neue Basis, also scheitert auch 03 → 04 – daily-04 fehlt am Ziel, Exit-Code 1.

Änderung

Schlägt ein Delta fehl und existiert der Snapshot auf der Quelle nicht mehr, wird er mit [WARN] übersprungen; das nächste Delta beginnt am zuletzt empfangenen Snapshot (ein inkrementeller Stream darf gelöschte Snapshots überspannen). Andere Fehler wie bisher. Eine zusätzliche Abfrage, nur nach einem fehlgeschlagenen Delta.

Mit source_hold=1 (#6) kommt das praktisch nicht mehr vor; die Änderung hilft bestehenden Configs ohne Holds.

Tests

  • Integration deleted_during: scheitert mit dem bisherigen Stand, besteht jetzt (daily-01 02 04, Exit-Code 0, Hinweis im Log)
  • Test-Harness gibt den Exit-Code von Läufen im Hintergrund korrekt zurück; zfs-Stub beantwortet Abfragen einzelner Snapshots
  • alle 26 Stub-Szenarien identisch zu main

Closes #7

🤖 Generated with Claude Code

Setzt #7 um. ## Problem (Test-VM, echtes ZFS, ohne Holds) Während des Deltas `daily-01 → daily-02` löscht die Rotation den geplanten `daily-03`. Heute: `02 → 03` scheitert, `03` wird trotzdem neue Basis, also scheitert auch `03 → 04` – `daily-04` fehlt am Ziel, Exit-Code 1. ## Änderung Schlägt ein Delta fehl und existiert der Snapshot auf der Quelle nicht mehr, wird er mit `[WARN]` übersprungen; das nächste Delta beginnt am zuletzt empfangenen Snapshot (ein inkrementeller Stream darf gelöschte Snapshots überspannen). Andere Fehler wie bisher. Eine zusätzliche Abfrage, nur nach einem fehlgeschlagenen Delta. Mit `source_hold=1` (#6) kommt das praktisch nicht mehr vor; die Änderung hilft bestehenden Configs ohne Holds. ## Tests - Integration `deleted_during`: scheitert mit dem bisherigen Stand, besteht jetzt (`daily-01 02 04`, Exit-Code 0, Hinweis im Log) - Test-Harness gibt den Exit-Code von Läufen im Hintergrund korrekt zurück; zfs-Stub beantwortet Abfragen einzelner Snapshots - alle 26 Stub-Szenarien identisch zu `main` Closes #7 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Skip a snapshot that was deleted on the source during the replication
All checks were successful
/ build (pull_request) Successful in 55s
/ integration (pull_request) Successful in 1m32s
/ test (debian-13) (pull_request) Successful in 42s
/ test (ubuntu-24.04) (pull_request) Successful in 42s
/ test (ubuntu-26.04) (pull_request) Successful in 50s
/ test (debian-12) (pull_request) Successful in 51s
/ publish (pull_request) Has been skipped
/ package (pull_request) Successful in 0s
a807d3f9b3
Without holds the rotation can delete a planned snapshot while an earlier
delta is still being sent. Its send failed, it was taken as the next base
anyway, so every following delta of the dataset failed as well (checked on
the test VM: daily-03 deleted during 01 -> 02, then 02 -> 03 and 03 -> 04
failed, daily-04 was missing).

If a delta fails and the snapshot no longer exists on the source, it is
skipped with a warning and the next delta starts at the last received
snapshot (an incremental stream can span deleted snapshots). Other errors are
handled as before. One additional query, only after a failed delta.

Tests: integration case deleted_during (fails before, passes now); the test
harness returns the exit code of background runs; the zfs stub answers
lookups of single snapshots. All stub scenarios identical to main.

Refs #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Manuell nach main gemergt (39efc7f), CI inkl. publish nach testing grün. Schließe den PR.

Manuell nach `main` gemergt (39efc7f), CI inkl. publish nach testing grün. Schließe den PR.
thorsten.spille closed this pull request 2026-10-15 22:51:00 +02:00
All checks were successful
/ build (pull_request) Successful in 55s
/ integration (pull_request) Successful in 1m32s
/ test (debian-13) (pull_request) Successful in 42s
/ test (ubuntu-24.04) (pull_request) Successful in 42s
/ test (ubuntu-26.04) (pull_request) Successful in 50s
/ test (debian-12) (pull_request) Successful in 51s
/ publish (pull_request) Has been skipped
/ package (pull_request) Successful in 0s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bashclub/zsync!37
No description provided.