You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "kaori-seasons (via GitHub)" <gi...@apache.org> on 2025/06/14 07:03:42 UTC
[PR] [ISSUE#7370] enhance IsolatedClassLoader [gravitino]
kaori-seasons opened a new pull request, #7393:
URL: https://github.com/apache/gravitino/pull/7393
### What changes were proposed in this pull request?
Related to [ISSUE#7370](https://github.com/apache/gravitino/issues/7370)
### Why are the changes needed?
The solution solves the Metaspace OOM problem in the following ways:
- ClassLoader reuse: Frequent ClassLoader creation in CatalogManager is replaced by a reuse mechanism managed by ClassLoaderPool
- Smart update strategy: Distinguish between key attribute changes that require re-creation of catalog instances and ordinary attribute changes that can be hot-updated
- Frequency limit: Prevent resource exhaustion caused by too frequent catalog operations
- Resource monitoring: Provides indicator collection and monitoring capabilities to facilitate problem diagnosis
- Lifecycle management: Improved resource management of CatalogWrapper in CatalogManager
### How was this patch tested?
(Please test your changes, and provide instructions on how to test it:
1. If you add a feature or fix a bug, add a test to cover your changes.
2. If you fix a flaky test, repeat it for many times to prove it works.)
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#7370] enhance IsolatedClassLoader [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #7393:
URL: https://github.com/apache/gravitino/pull/7393#issuecomment-2972943594
Hi @kaori-seasons thanks a lot for your contribution. Can you please change the PR description from Chinese to English? Thanks.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#7370] enhance IsolatedClassLoader [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on PR #7393:
URL: https://github.com/apache/gravitino/pull/7393#issuecomment-3274747880
@kaori-seasons
Do you have time to move forward with this PR? If you are busy with other things, I'd be happy to help with this PR.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#7370] enhance IsolatedClassLoader [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on PR #7393:
URL: https://github.com/apache/gravitino/pull/7393#issuecomment-2984311193
> @yuqi1129 Hi, could you please give me some advice?
@kaori-seasons
Thanks for your hard work, overall, I have the following concerns:
1. Class loader sharing is a complex issue. Different class loaders sharing the same class may lead to some unknown problems. For instance, some static instances are mutable and can be changed by one catalog, which will be used by other catalogs that share the class loaders.
2. The core issue seems to remain unresolved. I have tested that the class loader can't be cleaned by GC even though it has been closed and all classes it loaded are released. Considering the cases that there are plenty of catalogs at the same time, say 100, and only 10 of them are active, the memory occupied by metaspace will be `25MB * 100 = 2.5GB` though only 250MB are sufficient, it can easily cause OOM. Your solution can resolve the problem if modifications mainly focus on properties that don't need to create a new class loader.
3. Statistics and rate limits are crucial. I appreciate you introducing these works.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#7370] enhance IsolatedClassLoader [gravitino]
Posted by "kaori-seasons (via GitHub)" <gi...@apache.org>.
kaori-seasons commented on PR #7393:
URL: https://github.com/apache/gravitino/pull/7393#issuecomment-2972454571
@yuqi1129 Hi, could you please give me some advice?
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org