keith-turner commented on code in PR #5170:
URL: https://github.com/apache/accumulo/pull/5170#discussion_r1894207022
##########
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:
The halt code will attempt to log an error message so do not have to log
anything here. Can the testLockAndRun code be removed now that its not
closing the file?
```suggestion
```
--
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]