JetBrains / Exposed

Kotlin SQL Framework
http://jetbrains.github.io/Exposed/
Apache License 2.0
8.28k stars 690 forks source link

fix!: EXPOSED-317 repetitionAttempts property is misleading #2042

Closed bog-walk closed 6 months ago

bog-walk commented 6 months ago

The KDocs and the name for the property Transaction.repetitionAttempts makes it seem like setting the value to 1 means that any failed transaction would undergo 1 automatic retry or repeated attempt. Instead, setting the value to 1 means that the transaction is only run once, without any repetition or retry, and any failure is thrown. Example logic in source code

The property, and its related delay and default variants, are being deprecated in favor of properties that are more aligned with their underlying purpose and the common naming conventions of other standard retry tools/plugins/frameworks:

These properties are being replaced in 3 places:

  1. DatabaseConfig and its helper builder class
  2. Transaction class
  3. TransactionManager interface and its implementations

Breaking Changes: