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

[Bug report] Cannot rename catalog when enable authorization #5947

Closed
mchades opened this issue Dec 23, 2024 · 0 comments · Fixed by #5949
Closed

[Bug report] Cannot rename catalog when enable authorization #5947

mchades opened this issue Dec 23, 2024 · 0 comments · Fixed by #5949
Assignees
Labels
0.7.1 Release v0.7.1 0.8.0 Release v0.8.0 bug Something isn't working

Comments

@mchades
Copy link
Contributor

mchades commented Dec 23, 2024

Version

main branch

Describe what's wrong

After enabling authorization for Gravitino, I encountered a NoSuchCatalogException when trying to rename a catalog.

Error message and/or stacktrace

{
"code": 1003,
"type": "NoSuchCatalogException",
"message": "Failed to operate catalog(s) [test] operation [LOAD] under metalake [test], reason [Catalog test.test does not exist]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchCatalogException: Catalog test.test does not exist",
"\tat org.apache.gravitino.catalog.CatalogManager.loadCatalogInternal(CatalogManager.java:857)",
"\tat com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2406)",
"\tat java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853)",
"\tat com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2404)",
"\tat com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2387)",
"\tat com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108)",
"\tat com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62)",
"\tat org.apache.gravitino.catalog.CatalogManager.loadCatalogAndWrap(CatalogManager.java:776)",
"\tat org.apache.gravitino.catalog.CatalogManager.loadCatalog(CatalogManager.java:359)",
"\tat org.apache.gravitino.hook.CatalogHookDispatcher.loadCatalog(CatalogHookDispatcher.java:67)",
"\tat org.apache.gravitino.catalog.CatalogNormalizeDispatcher.loadCatalog(CatalogNormalizeDispatcher.java:71)",
"\tat org.apache.gravitino.listener.CatalogEventDispatcher.loadCatalog(CatalogEventDispatcher.java:106)",
"\tat org.apache.gravitino.server.web.rest.CatalogOperations.lambda$loadCatalog$8(CatalogOperations.java:250)",
"\tat org.apache.gravitino.lock.TreeLockUtils.doWithTreeLock(TreeLockUtils.java:49)",
"\tat org.apache.gravitino.server.web.rest.CatalogOperations.loadCatalog(CatalogOperations.java:249)",
"\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
"\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
"\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
"\tat java.lang.reflect.Method.invoke(Method.java:498)",
"\tat org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)",
"\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)",
"\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)",
"\tat org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)",
"\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)",
"\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)",
"\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)",
"\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)",
"\tat org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256)",
"\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)",
"\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)",
"\tat org.glassfish.jersey.internal.Errors.process(Errors.java:292)",
"\tat org.glassfish.jersey.internal.Errors.process(Errors.java:274)",
"\tat org.glassfish.jersey.internal.Errors.process(Errors.java:244)",
"\tat org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)",
"\tat org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)",
"\tat org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)",
"\tat org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)",
"\tat org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)",
"\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)",
"\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)",
"\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)",
"\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)",
"\tat org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)",
"\tat org.apache.gravitino.server.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:86)",
"\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)",
"\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)",
"\tat org.apache.gravitino.server.web.VersioningFilter.doFilter(VersioningFilter.java:111)",
"\tat org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)",
"\tat org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)",
"\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
"\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)",
"\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)",
"\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)",
"\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)",
"\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)",
"\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)",
"\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)",
"\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
"\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)",
"\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)",
"\tat org.eclipse.jetty.server.Server.handle(Server.java:516)",
"\tat org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)",
"\tat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)",
"\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)",
"\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)",
"\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)",
"\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)",
"\tat org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)",
"\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)",
"\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)",
"\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)",
"\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)",
"\tat java.lang.Thread.run(Thread.java:750)"
]
}

How to reproduce

  • set gravitino.authorization.enable = true in conf/gravitino.conf
  • create a catalog
  • rename the catalog

Additional context

No response

@mchades mchades added the bug Something isn't working label Dec 23, 2024
jerqi added a commit to qqqttt123/gravitino that referenced this issue Dec 23, 2024
jerqi added a commit to qqqttt123/gravitino that referenced this issue Dec 23, 2024
@mchades mchades added 0.8.0 Release v0.8.0 0.7.1 Release v0.7.1 labels Dec 23, 2024
jerryshao pushed a commit that referenced this issue Dec 23, 2024
… rename catalog (#5949)

### What changes were proposed in this pull request?

Fix the issue of renaming catalogs or metalakes.

### Why are the changes needed?

Fix: #5947

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?
Add UT.
jerqi added a commit to qqqttt123/gravitino that referenced this issue Dec 23, 2024
…on and rename catalog (apache#5949)

Fix the issue of renaming catalogs or metalakes.

Fix: apache#5947

No.

Add UT.
jerqi added a commit to qqqttt123/gravitino that referenced this issue Dec 23, 2024
…on and rename catalog (apache#5949)

Fix the issue of renaming catalogs or metalakes.

Fix: apache#5947

No.

Add UT.
Abyss-lord pushed a commit to Abyss-lord/gravitino that referenced this issue Dec 23, 2024
…on and rename catalog (apache#5949)

### What changes were proposed in this pull request?

Fix the issue of renaming catalogs or metalakes.

### Why are the changes needed?

Fix: apache#5947

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?
Add UT.
mchades pushed a commit that referenced this issue Dec 23, 2024
… rename catalog (#5949) (#5953)

### What changes were proposed in this pull request?
Fix the issue of renaming catalogs or metalakes.

### Why are the changes needed?
Fix: #5947

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?

Add UT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.7.1 Release v0.7.1 0.8.0 Release v0.8.0 bug Something isn't working
Projects
None yet
2 participants