{"record":{"id":"472c268f8f9428da","repo":"nautechsystems/nautilus_trader","slug":"failed-to-commit-verified-action-evidence-e","errorCode":null,"errorMessage":"Failed to commit verified action evidence: {e}","messagePattern":"Failed to commit verified action evidence: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/cache/database.rs","lineNumber":6168,"sourceCode":"            .bind(decision.read_class)\n            .bind(height_start)\n            .bind(height_end)\n            .bind(batch.manifest_version)\n            .bind(batch.manifest_digest)\n            .bind(batch.provider_ids)\n            .bind(batch.operator_ids)\n            .bind(batch.failure_domain_ids)\n            .bind(&decision.normalized_value_digest)\n            .bind(revision)\n            .bind(transition_key)\n            .execute(&mut *transaction)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to persist verified action evidence: {e}\"))?;\n        }\n        transaction\n            .commit()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to commit verified action evidence: {e}\"))?;\n        Ok(())\n    }\n\n    pub(crate) async fn load_execution_replacement_cursor(\n        &self,\n        intent_id: i64,\n        chain_id: u32,\n        wallet_address: &str,\n        nonce: u64,\n        manifest_digest: &str,\n    ) -> anyhow::Result<Option<ExecutionVerifiedHeader>> {\n        let chain_id = i32::try_from(chain_id)\n            .context(\"Replacement scan chain ID exceeds PostgreSQL INTEGER\")?;\n        let nonce =\n            i64::try_from(nonce).context(\"Replacement scan nonce exceeds PostgreSQL BIGINT\")?;\n        let row = sqlx::query_as::<_, (i64, String, String, i64, Option<String>, String)>(\n            \"\n            SELECT","sourceCodeStart":6150,"sourceCodeEnd":6186,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/cache/database.rs#L6150-L6186","documentation":"Transaction error in the verified-action evidence path: committing the transaction that persisted the evidence rows failed, so the evidence write was rolled back; the driver error is embedded in the message.","triggerScenarios":"transaction.commit() fails: connection dropped between the inserts and commit, deadlock detected by Postgres, serialization failure, or the server terminating the session.","commonSituations":"Network partition or pool timeout during a long batch; Postgres deadlocking with another transaction locking execution_intent/execution_verification_decision rows; server restart mid-transaction.","solutions":["Retry the entire record_execution_verification_batch call; the transaction rolled back so state is consistent","Check Postgres logs for deadlock/serialization-failure details and reduce lock contention on the intent row","Verify pool/network stability (timeouts, idle connections being reaped)","Inspect the inner `{e}` source for the exact server error"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = db.record_execution_verification_batch(&batch).await {\n    if e.to_string().contains(\"Failed to commit\") {\n        // transaction rolled back; safe to retry entire batch after backoff\n        return retry_with_backoff(batch, 3).await;\n    }\n    return Err(e);\n}","preventionTips":["Keep transactions short to reduce deadlock/window risk","Avoid lock ordering conflicts with other writers on execution_intent","Configure sane pool idle timeouts so connections survive the batch","Retry at the batch level; commit failure guarantees rollback"],"tags":["database","transaction","commit","sqlx"],"backgroundTag":"database-write-failed","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}