EdColeman commented on code in PR #3683:
URL: https://github.com/apache/accumulo/pull/3683#discussion_r1290661094


##########
core/src/main/java/org/apache/accumulo/core/classloader/ClassLoaderUtil.java:
##########
@@ -75,22 +75,29 @@ static synchronized void resetContextFactoryForTests() {
 
   @SuppressWarnings("deprecation")
   public static ClassLoader getClassLoader(String context) {
-    try {
-      if (FACTORY.isValid(context)) {
-        return FACTORY.getClassLoader(context);
-      } else {
-        return 
org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader.getClassLoader();
-      }
-    } catch (RuntimeException e) {
+    if (context != null && !context.isEmpty()) {
+      return FACTORY.getClassLoader(context);

Review Comment:
   Yes - one of the issues is that the way the context is being used, there 
have been "bad changes" where contexts that are in use have been deleted / 
removed.  So what was once valid when the context was set, it becomes invalid 
at some point.
   
   It may be that we can only do so much to insure that a context is valid and 
remains valid for the lifetime of its usage.  If it was correct when set, then 
it may not be a big leap to assume that it can be kept that way.
   
   However, protecting the system in the face of context errors so that it does 
not put things into an unrecoverable position should be a design goal.  The 
errors could be because of the user, or maybe a system / component issue - I 
think that is the path that the PR for preventing half-dead tservers moves in 
that direction and may be out of the scope of 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to