keith-turner commented on PR #2967: URL: https://github.com/apache/accumulo/pull/2967#issuecomment-1261434973
> I would prefer we not automatically retry. I would rather throw the ConcurrentModificationException. This should happen rarely, but when it does, it should be made known to the user, in case they want to do something different... like check with other groups who made the other change to see what the actually configuration should be. And, we shouldn't be hiding potential errors in user's automation, if they unintentionally have multiple processes changing the configuration without being aware of that. For the case you describe no one could ever rely on the concurrent modification exception to ensure the correctness of their system. If they want to ensure only a single process modifies configuration this exception does not offer a reliable way to ensure that or detect when that is not the case. I see the exception as a nuisance that may occur for normal use cases in a distributed system, it does not offer anything of value and will just cause people problems IMO. The wonderful thing about this new API is that allows a user the chance to atomically inspect the config and modify it. This new ability to atomically inspect and modify allows user to build code that is correct in a distributed system on top of this API. If someone wants to utilize this inspect and modify capability I can only think of uses cases where they would want to automatically retry. If their mapMutator inspects before modfifying then it will automatically redo the inspection on the latest snapshot when there is a concurrent modification. Atomic inspect and modify is a really neat new feature and I think automatic retry makes it easier to use it correctly. -- 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]
