Name : perl-DBIx-RetryOverDisconnects
| |
Version : 0.120.0
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 150600.1.1
| Date : 2024-07-20 21:54:00
|
Group : Unspecified
| Source RPM : perl-DBIx-RetryOverDisconnects-0.120.0-150600.1.1.src.rpm
|
Size : 0.02 MB
| |
Packager : https://www_suse_com/
| |
Summary : DBI wrapper that helps to deal with databases connection problems
|
Description :
This wrapper intercepts all requests. If some request fails this module detects the reason of fail. If the reason was database connection problem then wrapper would automatically reconnect and restart the query. Otherwise it would rethrow the exception.
If you are not in transaction then you can just do
$dbh->do(\'...\'); $sth->execute(...);
This might have 2 fatal cases:
* SQL error (a good reason to die).
* Reconnect retries limit reached (database is completely down or network failure).
For example, if the connection to database were lost during \'execute\' call, the module would reconnect to database with a timeout \'ReconnectTimeout\'. If reconnect failed it would reconnect again \'ReconnectRetries\' times with \'ReconnectInterval\' interval (in seconds). If reconnect retries limit was reached it would raise an error and $dbh->is_fatal_disconnect would be true.
If you are in transaction then even DB disconnect will raise an error. But you can check $dbh->is_trans_disconnect and restart the transaction if it is \'true\'. Other possible errors are the same: sql error and reconnect limit.
The recommended way of using transactions is
$dbh->txn_do($code_ref);
because \'txn_do\' would automatically restart the transaction if it was failed because of database disconnect. The transaction can be restarted at most \'TxnRetries\' times. If \'TxnRetries\' limit was reached then error would be raised and $dbh->is_fatal_trans_disconnect set to true. Other error cases are the same as above.
\'txn_do\' would try do to rollback if there was a perl or sql error (no rollback needed when you loose connection to database: DB server already has done it). Rollback is successul when $AATT =~ /Rollback OK/;
Note: For the perfomance reasons, DBI attribute \'RaiseError\' is always set to \'true\'.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/SLE_15_SP6/noarch |