File tree Expand file tree Collapse file tree
engine/packages/pegboard-envoy/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -474,14 +474,22 @@ async fn handle_sqlite_get_pages_response(
474474 match handle_sqlite_get_pages ( ctx, conn, request) . await {
475475 Ok ( response) => response,
476476 Err ( err) => {
477- tracing:: error!(
478- actor_id = %actor_id,
479- ?pgnos,
480- ?expected_generation,
481- ?expected_head_txid,
482- ?err,
483- "sqlite get_pages request failed"
484- ) ;
477+ if is_startup_database_miss ( & err, expected_generation, expected_head_txid) {
478+ tracing:: debug!(
479+ actor_id = %actor_id,
480+ ?pgnos,
481+ "sqlite get_pages did not find an existing actor database"
482+ ) ;
483+ } else {
484+ tracing:: error!(
485+ actor_id = %actor_id,
486+ ?pgnos,
487+ ?expected_generation,
488+ ?expected_head_txid,
489+ ?err,
490+ "sqlite get_pages request failed"
491+ ) ;
492+ }
485493 protocol:: SqliteGetPagesResponse :: SqliteErrorResponse ( sqlite_error_response ( & err) )
486494 }
487495 }
@@ -1115,6 +1123,16 @@ fn depot_error(err: &anyhow::Error) -> Option<&SqliteStorageError> {
11151123 . find_map ( |source| source. downcast_ref :: < SqliteStorageError > ( ) )
11161124}
11171125
1126+ fn is_startup_database_miss (
1127+ err : & anyhow:: Error ,
1128+ expected_generation : Option < u64 > ,
1129+ expected_head_txid : Option < u64 > ,
1130+ ) -> bool {
1131+ expected_generation. is_none ( )
1132+ && expected_head_txid. is_none ( )
1133+ && matches ! ( depot_error( err) , Some ( SqliteStorageError :: DatabaseNotFound ) )
1134+ }
1135+
11181136fn sqlite_error_reason ( err : & anyhow:: Error ) -> String {
11191137 err. chain ( )
11201138 . map ( ToString :: to_string)
You can’t perform that action at this time.
0 commit comments