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

View File

@ -670,7 +670,12 @@ impl PostgresClientWorker {
} }
} }
DbWorkItem::LogTransaction(transaction_log_info) => { 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 { Err(err) => match err {