-
Notifications
You must be signed in to change notification settings - Fork 219
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
[java] FuryPooledObjectFactory#classLoaderFuryPooledCache remove softValues #1632
Comments
If we remove it, those classes will never be collected. In some hot-loading classes scenarios, it will may cause class leak |
Maybe we can resolve this in another way. Like let users call Fury to clear classes explicitly. In this way, we can remove those weak/soft values |
I see it could be just remain |
The values can have strong references to keys. If value are not soft references, the weak key won't make the classes eligible for gc. If we remove soft values. The weak keys should be removed too |
I'd like think whether |
The value may have strong reference to key, so the key are always strong reachable, and it' will never be taken as weak. The thing here is that Fury will hold strong reference to classes of user objects. |
I see |
How about removing weakkeys & soft values, we can make The weak/soft values in |
It is a simple way and users mostly time need't to take this method. |
The thing is that Fury itself doesn't support change classloader currently, so we use a map to switch classloaders. Different classloader may have class with same name but different fields. So Fury made the classloader inmutable for simplicity. But in the long run, it would be great if we can allow update classloader on Fury itself without introducing extra performance overhead. |
## What does this PR do? remove soft/weak ref values from thread safe fury ## Related issues Closes #1632 ## Does this PR introduce any user-facing change? <!-- If any user-facing interface changes, please [open an issue](https://github.com/apache/incubator-fury/issues/new/choose) describing the need to do so and update the document if necessary. --> - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? ## Benchmark <!-- When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here. -->
Is your feature request related to a problem? Please describe.
classLoaderFuryPooledCache with
weakKeys
,softValues
,expireAfterAccess
, values removed too frequently. In some case it will create too much fury.Describe the solution you'd like
I'd like to remove
softValues
options. evenweakKey
can be removed too, just remainexpireAfterAccess
Additional context
The text was updated successfully, but these errors were encountered: