sundapeng opened a new pull request, #10588:
URL: https://github.com/apache/paimon/pull/10588

   ### Purpose
   
   The REST commit lease protocol from #10491 states in three places of 
`rest-catalog-open-api.yaml` that lease ownership is the exact `commitUser` 
together with the authenticated caller:
   
   | Operation | Current text |
   |---|---|
   | `commitTable` | "The authenticated caller and snapshot.commitUser must 
match the active owner." |
   | `acquireCommitLock` | "Ownership is the exact commitUser together with the 
authenticated caller." |
   | `renewCommitLock` | "Validate the table incarnation, branch, authenticated 
caller and exact commitUser against the unexpired lease." |
   
   The `concurrency-control.md` section with the same rule was removed in 
7f7e874619. Two problems with binding to the caller:
   - A server can resolve the same writer's credentials to different principals 
depending on the route or gateway, or after a credential refresh. The writer 
then loses its own lease and cannot see why.
   - The client never sends a caller identity. `CommitLockRequest` carries only 
`tableId` and `commitUser`.
   
   This PR makes the three descriptions define ownership by the exact 
`commitUser` alone:
   - callers still need authentication and the commit permission for every 
request;
   - callers that send the same `commitUser` share the lease, so each logical 
writer must use a unique `commitUser`.
   
   The wire format, the clients and the other lease rules are unchanged.
   
   ### Tests
   
   - `npm run test:rest-openapi` (`docs/scripts/validate-rest-openapi.js`, 
js-yaml 4.3.2) passes: 62 REST Catalog operations and 10 REST Management 
operations.
   - `git diff --check` is clean.
   


-- 
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