Search before asking
Paimon version
Compute Engine
N/A
tested on Java API
Minimal reproduce step
It's hard to give a minimal reproducible sample. Currently i'm implementing custom rest catalog and in pseudo-code it looks like this:
catalog.createBranch(Identifier(database, table), branchName)
... // produce some events in branch to trigger snapshot creation
catalog.forwardBranch(Identifier(database, table))
Working example in this case would be:
catalog.createBranch(...)
... // produce some events in branch to trigger snapshot creation
catalog.createTag(new Identifier(database, table, branch), tagName, ...)
catalog.forwardBranch()
Without tag i got an error:
Caused by: java.lang.RuntimeException: Exception occurs when fast forward 'branch_63db5f27e1ca4162a8cc7f79a5addc8c' (directory in s3a://warehouse/db_6e4bd5b663ad4dc496ebe99118156b27.db/table_b6de925dbf49482b8fdc313bb74797e1/branch/branch-branch_63db5f27e1ca4162a8cc7f79a5addc8c).
at org.apache.paimon.utils.FileSystemBranchManager.fastForward(FileSystemBranchManager.java:205)
...
Caused by: java.io.FileNotFoundException: No such file or directory: s3a://warehouse/db_6e4bd5b663ad4dc496ebe99118156b27.db/table_b6de925dbf49482b8fdc313bb74797e1/branch/branch-branch_63db5f27e1ca4162a8cc7f79a5addc8c/tag
What doesn't meet your expectations?
According to current spec of catalog#fastForward:
Fast-forward a branch to main branch.
Params:
identifier – path of the table, cannot be system or branch name.
branch – the branch name
void fastForward(Identifier identifier, String branch) throws BranchNotExistException;
i expected that only tag is not required for fast-forward.
Anything else?
It seems, that a minor change in the FileSystemBranchManager#fastForward will fix the problem: check if any tags on branch exist and if yes, then copy them, otherwise just skip this step
Are you willing to submit a PR?
Search before asking
Paimon version
Compute Engine
N/A
tested on Java API
Minimal reproduce step
It's hard to give a minimal reproducible sample. Currently i'm implementing custom rest catalog and in pseudo-code it looks like this:
Working example in this case would be:
Without tag i got an error:
What doesn't meet your expectations?
According to current spec of catalog#fastForward:
i expected that only tag is not required for fast-forward.
Anything else?
It seems, that a minor change in the FileSystemBranchManager#fastForward will fix the problem: check if any tags on branch exist and if yes, then copy them, otherwise just skip this step
Are you willing to submit a PR?