You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "EdColeman (via GitHub)" <gi...@apache.org> on 2023/03/08 19:53:25 UTC

[GitHub] [accumulo] EdColeman commented on a diff in pull request #3230: remove invalid tserver locks before upgrade

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


##########
server/manager/src/main/java/org/apache/accumulo/manager/upgrade/PreUpgradeValidation.java:
##########
@@ -117,4 +141,114 @@ private void fail(Exception e) {
     System.exit(1);
   }
 
+  private void validateTableLocks(final ServerContext context) {
+
+    final ZooReaderWriter zrw = context.getZooReaderWriter();
+    final ZooKeeper zk = zrw.getZooKeeper();
+    final String rootPath = context.getZooKeeperRoot();
+    final String tserverLockRoot = rootPath + Constants.ZTSERVERS;
+
+    log.debug("Looking for locks that may be from previous version in path: {}", tserverLockRoot);
+
+    AtomicInteger errorCount = new AtomicInteger(0);
+
+    List<Pair<HostAndPort,ServiceLock.ServiceLockPath>> hostsWithLocks =
+        gatherLocks(zk, tserverLockRoot);
+
+    // try a thrift call to the hosts - hosts running previous versions will fail the call
+    ThreadPoolExecutor lockCheckPool = ThreadPools.getServerThreadPools().createThreadPool(8, 32,

Review Comment:
   Using a custom pool bounds the number of threads and keeps the global fork/join pool available - there seems to be conflicting advise on this, with some saying avoid using fork / join and others advocating for it.  I lean toward the predictability of a custom pool.



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org