If configured so, panic if there is an error saving transactions in the plugin (#21602)

This commit is contained in:
Lijun Wang 2021-12-04 12:47:28 -08:00 committed by GitHub
parent d6f22433d0
commit f4ca87205f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -670,7 +670,12 @@ impl PostgresClientWorker {
}
}
DbWorkItem::LogTransaction(transaction_log_info) => {
self.client.log_transaction(*transaction_log_info)?;
if let Err(err) = self.client.log_transaction(*transaction_log_info) {
error!("Failed to update transaction: ({})", err);
if panic_on_db_errors {
abort();
}
}
}
},
Err(err) => match err {