#1220·litestream

Restore corruption reproduces in short soak tests on main

Author: corylanouCreated Mar 28, 2026Updated Sep 25, 2026
Labelsstale

Summary

Short soak tests can restore successfully and still fail SQLite integrity check with index corruption.

This reproduces on main and is not specific to PR #1211.

Possibly related to #1164, but this issue includes a concrete local repro.

Reproduction

I reproduced this from main at ad55ec1.

  1. Run the short comprehensive soak:
bash
SOAK_DEBUG=1 go test -v -tags='integration,soak' -run=TestComprehensiveSoak -test.short -timeout=1h ./tests/integration
  1. Run the short MinIO soak:
bash
SOAK_AUTO_PURGE=yes SOAK_DEBUG=1 go test -v -tags='integration,soak,docker' -run=TestMinIOSoak -test.short -timeout=20m ./tests/integration

Actual Behavior

Both tests completed replication and restore, then failed during integrity validation.

Observed error:

integrity check failed: wrong # of entries in index idx_load_test_timestamp

Additional observations from both runs:

  • restore completed successfully
  • row counts matched between source and restored DB
  • soak tests reported 0 replication errors before restore

Example from TestMinIOSoak:

✓ Restoration successful!
✓ Row counts match! (9583 rows)
Integrity check failed: integrity check failed: wrong # of entries in index idx_load_test_timestamp

Example from TestComprehensiveSoak:

Testing restoration...
✓ Restoration successful!
Validating restored database integrity...
Integrity check failed: integrity check failed: wrong # of entries in index idx_load_test_timestamp

Expected Behavior

Restored databases from these soak tests should pass SQLite integrity check.

Notes

  • I first hit this while validating PR #1211, then reran the same soak commands on main to check whether the PR introduced it.
  • The failure reproduced on main, so this does not currently look like a regression from PR #1211.
  • PR CI did not reproduce this exact problem; the targeted local short soak commands above did.