You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/06/21 19:57:17 UTC

[GitHub] [flink] zentol edited a comment on pull request #16191: [FLINK-23029] Extend PluginLoader to allow closing ClassLoader

zentol edited a comment on pull request #16191:
URL: https://github.com/apache/flink/pull/16191#issuecomment-865300941


   > What happens if we use close in production code?
   
   Production code has to ensure that the loaded plugin is no longer used before closing the class loader. In practice I intend to call close when the ClusterEntrypoint/TaskManagerRunner/MiniCluster is being shutdown, after the RPCService has been shut down.
   
   >  Would everything fail miserable with cryptic messages?
   
   You'd get the usual ClassNotFoundExceptions etc. when trying to load a new class; which I would be fine with for the time being because it is only for an internal use-case that isn't visible to users.
   
   > Should we add our own guard for all respective accesses?
   
   We could do that yes, but see above.
   
    > Could we add @VisibleForTesting for now to avoid the issues?
   
   `@VisibleForTesting` is not applicable in this case, because the MiniCluster (the primary user) is _not_ test code.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org