ctubbsii commented on a change in pull request #1677:
URL: https://github.com/apache/accumulo/pull/1677#discussion_r469633898
##########
File path:
server/base/src/main/java/org/apache/accumulo/server/ServerContext.java
##########
@@ -68,13 +68,22 @@
private CryptoService cryptoService = null;
public ServerContext(SiteConfiguration siteConfig) {
- this(new ServerInfo(siteConfig));
+ this(new ServerInfo(siteConfig), true);
+ }
+
+ public ServerContext(SiteConfiguration siteConfig, boolean
enableZookeeperRetries) {
+ this(new ServerInfo(siteConfig), enableZookeeperRetries);
}
private ServerContext(ServerInfo info) {
+ this(info, true);
+ }
+
+ private ServerContext(ServerInfo info, boolean enableRetries) {
super(SingletonReservation.noop(), info, info.getSiteConfiguration());
this.info = info;
- zooReaderWriter = new ZooReaderWriter(info.getSiteConfiguration());
+ zooReaderWriter = enableRetries ?
ZooReaderWriter.retriesEnabled(info.getSiteConfiguration())
+ : ZooReaderWriter.retriesDisabled(info.getSiteConfiguration());
Review comment:
If we do something like add a retry to every method, I'd like to revisit
my effort to clean up the ZooReaderWriter stuff, like what I had started to do
in #1459 ; it would be easier to add something like a retry to every method, if
the code were cleaned up a bit first. I can revisit my previous cleanup effort
over the next week.
In the meantime, I still think it's probably best to simply avoid the
problematic ZRW code in the ZooLock. ZooLock does not need to use the
general-purpose utility code, when it can use something specific to its needs.
----------------------------------------------------------------
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]