Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions aw-datastore/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ impl DatastoreWorker {
}
match transaction.commit() {
Ok(_) => (),
Err(err) => panic!("Failed to commit datastore transaction! {err}"),
Err(err) => {
error!("Failed to commit legacy import transaction: {err}");
// Continue without panicking — legacy import will be retried on
// next startup if the commit didn't persist.
}
}
}

Expand Down Expand Up @@ -192,7 +196,18 @@ impl DatastoreWorker {
);
match tx.commit() {
Ok(_) => (),
Err(err) => panic!("Failed to commit datastore transaction! {err}"),
Err(err) => {
error!(
"Failed to commit datastore transaction ({} events lost): {err}",
self.uncommitted_events
);
// Continue instead of panicking — the worker thread survives this
// transient failure (e.g. SQLITE_FULL on disk full). Note: clients
// already received success responses before the commit, so they won't
// know to retry. Rolled-back events create a gap in the timeline;
// watchers will resume sending heartbeats from current state, but the
// specific batch of events is permanently lost.
}
}
if self.quit {
break;
Expand Down
Loading