ddanielr commented on PR #4746: URL: https://github.com/apache/accumulo/pull/4746#issuecomment-2245545606
> > The following were some situations I was thinking through when looking at the code. > > * User configures an invalid class name for a compaction dispatcher or scan dispatcher. In this case, I think the code before and after the changes in this PR would probably fall back to the default services/executors. - Yes this behavior happens today, the class is not able to be found and the compaction dispatcher will drop back to the default. > * User configures a valid class name for a dispatcher, however there is a transient classloader problem where the class can not be created. Not sure about what would happen before these changes. After these changes the code may stick with the default impls that were passed to Property.createTableInstanceFromPropertyName even after the transient class loader issue resolves itself. Not sure what it would do before these changes. - Based on previous testing, it appeared that the Deriver would store a nil object that's returned from the classloader. Because the property in the configuration never changed, it would never attempt to reload the class. > * User configures a valid class name for a dispatcher and the class is loaded ok, but it throws an error in init. I think before and after these changes this will cause an exception to percolate up. So its seems the code goes through a lot of trouble to handle one error (class loading or class not found) and fall back to defaults, but for another type of error it just lets it fly. Error on init seems to be an okay pattern for failure because we cannot guarantee the creation order of properties. In that case, there is nothing wrong with the original class but there is something wrong with the configuration of that class. #4338 may help to improve validation in future cases. -- 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]
