fix(server): stop the background compaction before the database is closed
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m35s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m35s
The compaction starts right away in NewServer and could still write to the SQLite files while a
test's temp dir was removed ("directory not empty" on the CI runner, TestWebhookTokenInURLOnlyAPIKey).
Server.Close stops it and waits for a running pass; tests call it before closing the store, and the
server calls it on shutdown before the deferred store.Close. v0.37.1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3fbe015c06
commit
c56bd4d943
10 files changed
+43
-6
No files matched your search
@@ -103,4 +103,6 @@ func main() {
|
||||
if err := httpServer.Shutdown(ctx); err != nil {
|
||||
slog.Warn("HTTP server shutdown finished with error", "error", err)
|
||||
}
|
||||
// Let a running compaction finish before the deferred store.Close
|
||||
srv.Close()
|
||||
}
|
||||
Reference in new issue
Block a user