You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "jackylee-ch (via GitHub)" <gi...@apache.org> on 2026/09/25 06:50:38 UTC

[PR] [python] Add a table rollback CLI command [paimon]

jackylee-ch opened a new pull request, #10177:
URL: https://github.com/apache/paimon/pull/10177

   ## Purpose
   
   The Paimon CLI exposes `table read` / `snapshot` / `import` / `alter`, but
   no rollback, while the `FileStoreTable` API already has `rollback_to`
   (snapshot id or tag) and `rollback_to_timestamp`. After a bad write,
   operators could only recover by writing Python — there was no
   command-line equivalent.
   
   ## Change
   
   - Add a `table rollback` subcommand mirroring the existing subcommands
     (positional `database.table`, delegating to the table's rollback API).
   - A required, mutually-exclusive target: `--snapshot <id>` /
     `--tag <name>` / `--timestamp <epoch-millis>`. Non-`FileStoreTable`
     targets and API errors report a clean message and exit non-zero.
   
   ## Tests
   
   - Roll a two-snapshot table back to snapshot 1 via the CLI and assert the
     latest snapshot returns to 1 (verified non-vacuous: without the
     subcommand the command is rejected and the state is unchanged).
   - The subcommand requires exactly one target selector.
   
   Written with Claude Code; verification is mine.
   


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [python] Add a table rollback CLI command [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #10177:
URL: https://github.com/apache/paimon/pull/10177#issuecomment-5831474854

   Reviewed fc0af4c for the operator recovery path. The CLI adds clear end-to-end value: it exposes the existing table rollback API after a bad write, and the required mutually exclusive selector prevents an ambiguous target. I checked the CLI dispatch against `FileStoreTable.rollback_to` / `rollback_to_timestamp`, including the REST catalog delegation and error paths. No blocking issue found.
   
   Validation: the two new CLI cases passed, including a real two-snapshot table restored to snapshot 1; the broader CLI and rollback selection ran 50 tests successfully. `git diff --check` passed, and CI run 36104718143 is green. The local tests use a filesystem catalog; the existing REST rollback API tests cover its delegate but this PR does not add a live REST CLI test.


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [python] Add a table rollback CLI command [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #10177:
URL: https://github.com/apache/paimon/pull/10177


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org