linliu-code opened a new pull request, #20186:
URL: https://github.com/apache/hudi/pull/20186

   ### Describe the issue this Pull Request addresses
   
   RFC-91 assumes every conditional write on the lock file gets a definitive 
answer: success, 412, or 409. In production a write can also come back with an 
ambiguous answer (a 5xx, a client timeout, or a dropped connection), and the 
write may still have landed. The RFC has no rule for this. As a result, each 
operation handles it differently, and some paths turn our own landed write into 
a false "lock lost" or a failed release. That costs a lease period of stalled 
writers and shows up as a dangling lock.
   
   This is the design discussion requested on #20028. It comes first so the 
rule is agreed before the code changes. #20028 and #20129 will implement it.
   
   ### Summary and Changelog
   
   Adds an "Ambiguous write results" subsection to RFC-91:
   - Defines an ambiguous write result.
   - Rule: retry the operation with the same precondition, and remember that 
the write is unresolved until a definitive answer arrives. While it is 
unresolved, read the lock file back before treating a later 412, or a lock that 
looks held, as another writer's. This works because each provider instance has 
a random owner UUID that no other instance writes.
   - How tryLock, renewLock and unlock resolve the read-back, and what stays 
unchanged: a different owner is still reported as acquired by others, and a 
failed read is treated as another writer's write.
   - Notes on version tags (per cloud), clock steps, the best-effort 
shutdown-hook release, and the per-client classification of timeouts and S3 409.
   - The acquire read-back requires a still-valid lease carrying the expiration 
this call wrote, and the unlock read-back requires the same expiration as the 
lock being released. Adoption can therefore never take over a lock another 
writer may legitimately acquire.
   
   ### Impact
   
   Design document only. No code, config or API change in this PR.
   
   ### Risk Level
   
   none
   
   ### Documentation Update
   
   This PR is the documentation update.
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [ ] Adequate tests were added if applicable
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to