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.
   At that point exceptions are usually not a major concern.
   
   >  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:
[email protected]


Reply via email to