Repository navigation
Fix backup lock file check errors handling - #113637
Conversation
`BackupImpl::checkLockFile` verifies that the current backup owns the lock file. However, any errors while accessing the file (e.g. missing AWS S3 access rights) contents were treated as a content mismatch error, thus resulting in misleading errors returned to the client. This commit propagates exceptions thrown at the lower levels to the caller, thus preserving the root cause error. If the `throw_if_failed` is set to false, exceptions are logged and swallowed, and `checkLockFile` returns false, maintaining the invariant "if !throw_if_failed -> no exceptions are thrown".
|
Workflow [PR], commit [634533f] Summary: ✅
AI ReviewSummaryThis PR changes PR Metadata
Final Verdict✅ No code-level blockers or majors found in the current diff. The only issue I found is the PR metadata: the changelog should describe this as a LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 84/96 (87.50%) · Uncovered code |
|
Looks like |
jkartseva
left a comment
There was a problem hiding this comment.
LGTM; let's decide if we want to GC the orphaned .lock file.
BackupImpl::checkLockFileverifies that the current backup owns the lock file. However, any errors while accessing the file (e.g. missing AWS S3 access rights) contents were treated as a content mismatch error, thus resulting in misleading errors returned to the client.This commit propagates exceptions thrown at the lower levels to the caller, thus preserving the root cause error.
If the
throw_if_failedis set to false, exceptions are logged and swallowed, andcheckLockFilereturns false, maintaining the invariant "if !throw_if_failed -> no exceptions are thrown".Closes: #84298, #65965
Changelog category (leave one):
Changelog entry
Backups now report the underlying lock-file access error instead of incorrectly reporting a concurrent backup when the destination storage cannot read the .lock file.
Version info
26.8.1.1168(included in26.8and later)