mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-03-09 12:12:21 +01:00
When backup completion and retention policy enforcement run concurrently, both call updateRecoveryWindow to update the ObjectStore status. This can cause "object has been modified" errors due to Kubernetes optimistic concurrency control. This change wraps the status update in retry.RetryOnConflict, matching the pattern already used in setLastFailedBackupTime in the same file. The retry logic fetches a fresh copy of the ObjectStore before each update attempt, ensuring the resourceVersion is current. Fixes #758 Signed-off-by: Gabriel Mouallem <gabriel@latitude.sh> |
||
|---|---|---|
| .. | ||
| cmd | ||
| cnpgi | ||
| controller | ||