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

   ### Purpose
   
   Follow-up to #9937. DlfNext `2026-01-18` now registers three more operations 
that the REST client calls:
   
   | Operation | Route |
   |---|---|
   | `AcquireCommitLock` | `POST 
/v1/{prefix}/databases/{database}/tables/{table}/commit-lock` |
   | `RenewCommitLock` | `POST 
/v1/{prefix}/databases/{database}/tables/{table}/commit-lock/renew` |
   | `ReplaceTable` | `POST 
/v1/{prefix}/databases/{database}/tables/{table}/replace` |
   
   `DLFOpenApiActions` has no entries for them, so `DLFOpenApiV4Signer` signs 
these requests without `x-acs-action`. A gateway that requires the header 
rejects them, just as it rejected `GetConfig` before #9937. As a result, 
`openapi-v4` writers cannot take a commit lease (`rest.commit.acquire-lock`) or 
replace a table.
   
   This PR adds the three operations. The lease names follow the operationIds 
`acquireCommitLock` and `renewCommitLock` in `rest-catalog-open-api.yaml`. 
`replace` has no operationId, so `ReplaceTable` follows `RESTApi#replaceTable`. 
The names must match exactly: when the header is present, the gateway routes on 
it. pypaimon does not call these endpoints, so its table is unchanged.
   
   ### Tests
   
   - `DLFOpenApiActionsTest`: the client paths from `ResourcePaths#commitLock` 
(plus `/renew`) and `ResourcePaths#replaceTable` resolve to the three actions, 
and the registered action count goes from 61 to 64. `DLFOpenApiActionsTest`, 
`DLFOpenApiV4SignerTest` and `DLFRequestSignerTest` pass (41 tests).
   - Verified against a DlfNext `2026-01-18` gateway that registers the three 
operations, using `openapi-v4` with this table on the classpath: the commit 
lease cases (acquire, renew, a second writer blocked until the holder commits, 
and request validation) and a replace table case pass, 5/5.
   - In a second run, `commit-lock` was mapped to an action name the gateway 
does not register. Every lease call then returned an empty 404, which confirms 
that the gateway routes on the header when it is present.
   


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