yuqi1129 commented on issue #7370: URL: https://github.com/apache/gravitino/issues/7370#issuecomment-2974872481
@kaori-seasons , Thanks for your hard work on this issue, your kind suggestion is really valuable for solving this issue on the ground. Based on my previous knowledge and work on this issue. > Short-term mitigation plan Temporarily, it may alleviate the problem, but it won't solve it in the long run. The reproduction steps I mentioned are just a simple example. The following cases will also lead to an OOM. Assuming we have plenty of Iceberg catalogs created, when we use Gravitino to manage them, there will also be a lot of `IsolatedClassLoader`. I'm afraid that JVM parameters optimized can resolve it. > Consider implementing the reuse mechanism of IsolatedClassLoader, and share the classloader for catalogs of the same provider type I have been thinking about it for a long time, and it seems to be a good resolution to the issue. We can cache class loaders and share them among multiple instances. For instance, any catalogs with the same provider and package values can use the same classloader; we could introduce a reference count for the specific class loader. When the reference count of a class counter reaches 0, we can release, close, and then allow the GC to clean it up. -- 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]
