yuqi1129 commented on code in PR #9475:
URL: https://github.com/apache/gravitino/pull/9475#discussion_r2646703611
##########
core/src/main/java/org/apache/gravitino/GravitinoEnv.java:
##########
@@ -537,14 +539,28 @@ private void initGravitinoServerComponents() {
SchemaOperationDispatcher schemaOperationDispatcher =
new SchemaOperationDispatcher(catalogManager, entityStore,
idGenerator);
- SchemaHookDispatcher schemaHookDispatcher = new
SchemaHookDispatcher(schemaOperationDispatcher);
+ SchemaDispatcher schemaDispatcherProxy =
+ (SchemaDispatcher)
+ Proxy.newProxyInstance(
+ SchemaDispatcher.class.getClassLoader(),
+ new Class[] {SchemaDispatcher.class},
+ new OperationDispatcherInterceptor(
Review Comment:
Please note the following change:
<img width="1050" height="538" alt="image"
src="https://github.com/user-attachments/assets/27d444e6-1a1d-4900-94c6-c5204ac63e48"
/>
I have removed `catalogInUse` from `doWithCatalog`, so any endpoint in the
dispatcher will now call and only call `catalogInUse` once with these
interceptors.
Before, take loading a table for example, it will
<img width="1241" height="833" alt="image"
src="https://github.com/user-attachments/assets/bcac3620-d860-4004-8dbe-532b14957b10"
/>
After:
As I removed all `catalogInUse` from `doWithCatalog`, there will be only one
in the interceptor and none in the `loadTable`.
--
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]