Evict archive writers on deletion and sweep idle archives (closes #89) (#95)
Some checks failed
check / check (push) Has been cancelled
Some checks failed
check / check (push) Has been cancelled
Per-webhook archive writers are now evicted when the webhook or its last database target is deleted, and a background sweeper prunes expired rows from idle archives that no longer receive writes. Archive files themselves are never deleted.
This commit was merged in pull request #95.
This commit is contained in:
@@ -50,6 +50,13 @@ func openArchiveDBForRead(
|
||||
return gdb
|
||||
}
|
||||
|
||||
// archiveFileSuffixes returns the archive file itself and the
|
||||
// SQLite sidecars that accompany an open database. A test that
|
||||
// asserts no archive was created has to check all of them.
|
||||
func archiveFileSuffixes() []string {
|
||||
return []string{"", "-wal", "-shm"}
|
||||
}
|
||||
|
||||
// removeArchiveFiles simulates an operator moving the archive
|
||||
// away by deleting the SQLite file and its sidecar files.
|
||||
func removeArchiveFiles(t *testing.T, path string) {
|
||||
|
||||
Reference in New Issue
Block a user