zhaomin1423 commented on PR #43439:
URL: https://github.com/apache/spark/pull/43439#issuecomment-1777490785
> > What I am confused about is, how should we check the effect after gc is
triggered
>
> Construct a case where `SparkResult` won't be manually closed, and check
if after registering `cleanable`, `Cleaner.impl.phantomCleanableList` is not
empty, but eventually `phantomCleanableList` is empty? This may require adding
some code to get `phantomCleanableList` through reflection, just a suggestion,
not sure if it's really feasible.
can't get Cleaner.impl by reflect, there is an exception.
```
Exception in thread "main" java.lang.reflect.InaccessibleObjectException:
Unable to make field final jdk.internal.ref.CleanerImpl
java.lang.ref.Cleaner.impl accessible: module java.base does not "opens
java.lang.ref" to unnamed module @2f92e0f4
at
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at
java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]