dlmarion commented on code in PR #5170:
URL: https://github.com/apache/accumulo/pull/5170#discussion_r1894231749


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java:
##########
@@ -458,6 +460,27 @@ private void write(final Collection<CommitSession> 
sessions, boolean mincFinish,
       // the logs haven't changed.
       final int finalCurrent = currentLogId;
       if (!success) {
+        final ServiceLock tabletServerLock = tserver.getLock();
+        if (sawWriteFailure && tabletServerLock != null) {
+          log.info("WAL write failure, validating server lock in ZooKeeper");
+          if (!tabletServerLock.verifyLockAtSource()) {
+            // try to close the log, then Halt the VM
+            testLockAndRun(logIdLock, new TestCallWithWriteLock() {
+
+              @Override
+              boolean test() {
+                return true;
+              }
+
+              @Override
+              void withWriteLock() throws IOException {}
+            });
+
+            log.error("Writing to WAL has failed and TabletServer lock does 
not exist. Halting...");

Review Comment:
   I'm not sure which is why I wanted you to review.



-- 
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