Skip to content

Releases: Ahed92Wakim/laravel-db-transaction-retry

v2.0.0 – Configurable Deadlock Retrier & Logging Overhaul

20 Oct 18:03
96ee0ca

Choose a tag to compare

Breaking

  • Replaced DBTransactionRetryHelper::transactionWithRetry() with the new MysqlDeadlocks\RetryHelper\Services\DeadlockTransactionRetrier::runWithRetry(). Update imports/usages accordingly.
  • Package config now lives under config/mysql-deadlock-retry.php; publish it with php artisan vendor:publish --tag=mysql-deadlock-retry-config if you rely on defaults.

Highlights

  • Added first-class configuration for retry counts, base delay, and log file naming, all overridable via env vars.
  • Introduced DeadlockTransactionRetrier service with exponential backoff, jitter, request-aware logging context, and container-exposed transaction labels.
  • Delivered dedicated helpers (DeadlockLogWriter, TraceFormatter, BindingStringifier) for consistent instrumentation and easier extension.
  • Updated README with usage samples, configuration guidance, and package badges.

Maintenance

  • Switched the test suite to Pest and broadened coverage for retry scenarios, logging behaviour, and jitter math.
  • Refreshed GitHub Actions workflow, coding standards config, and development dependencies.

What's Changed

New Contributors

Full Changelog: 1.3.1...2.0.0

Don't log the none deadlock exception just throw it

11 Oct 17:20

Choose a tag to compare

Improves DB transaction retry logic

do not log if non deadlock exception just throw it

improve logs

03 Oct 11:02

Choose a tag to compare

1.2.3

improve log

fix log-directory

03 Oct 10:02

Choose a tag to compare

1.2.1

Merge branch 'hotfix/fix-log'

improve retry logic

03 Sep 13:20

Choose a tag to compare

Updates dependencies and improves retry logic

- Updates composer dependencies to newer versions, including Laravel 12 and PHP 8.2
- Refactors retry logic to include exponential backoff with jitter for more robust handling of deadlocks
- Improves logging context with request details (URL, method, token, userId) when available, and includes full exception traces for debugging
- Enhance logic to identify retryable deadlock/serialization failure errors