Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloneTable does not properly determine and validate the source and destination namespaceIds #5324

Open
ctubbsii opened this issue Feb 11, 2025 · 2 comments · May be fixed by #5334
Open

CloneTable does not properly determine and validate the source and destination namespaceIds #5324

ctubbsii opened this issue Feb 11, 2025 · 2 comments · May be fixed by #5334
Assignees
Labels
blocker This issue blocks any release version labeled on it.
Milestone

Comments

@ctubbsii
Copy link
Member

There are a couple of problems here. But the core if it is that the CloneTable fate operation uses the target tableName to compute the namespaceId, regardless of whether it should be using the destination namespace or the source namespace. This is an issue because we allow cloning across namespaces (NamespaceIT has an explicit test to verify that this is possible, and that test passes).

First, the check for permissions checks the destination namespace for both the READ permission for the source table and the CREATE permission for the destination namespace, when it should use the source namespace for the former.

Second, the CloneTable fate operation incorrectly uses the destination namespaceId as though it were the source namespaceId, for the purposes of reserving the namespace locks. In both places where the srcNamespaceId and the namespaceId are computed, they use the same tableName (the destination table name) to determine the namespaceId to use.

There may be other related bugs in this code. This ticket just tracks the initial observations.

@ctubbsii ctubbsii added the blocker This issue blocks any release version labeled on it. label Feb 11, 2025
@ctubbsii ctubbsii added this to the 2.1.4 milestone Feb 11, 2025
@dlmarion
Copy link
Contributor

@ctubbsii - is this closed by #5323?

@ctubbsii
Copy link
Member Author

@ctubbsii - is this closed by #5323?

No. This is a separate thing. @keith-turner and I saw it while investigating the fix in #5323, but #5323 does not address it.

@dlmarion dlmarion self-assigned this Feb 13, 2025
dlmarion added a commit to dlmarion/accumulo that referenced this issue Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker This issue blocks any release version labeled on it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants