diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java index 3e5be5db707..00fc1fe7fd5 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java @@ -31,6 +31,7 @@ import org.apache.accumulo.core.data.ByteSequence; import org.apache.accumulo.core.manager.state.tables.TableState; import org.apache.accumulo.core.metadata.TabletFile; +import org.apache.accumulo.core.util.Halt; import org.apache.accumulo.core.util.LocalityGroupUtil; import org.apache.accumulo.server.compaction.CompactionStats; import org.apache.accumulo.server.compaction.FileCompactor; @@ -93,7 +94,18 @@ public CompactionStats call() { try { do { try { - CompactionStats ret = super.call(); + CompactionStats ret = null; + try { + ret = super.call(); + } catch (Exception e) { + if (tabletServer.getLock() == null || !tabletServer.getLock().verifyLockAtSource()) { + log.error("Minor compaction of {} has failed and TabletServer lock does not exist." + + " Halting...", getExtent(), e); + Halt.halt("TabletServer lock does not exist", -1); + } else { + throw e; + } + } // log.debug(String.format("MinC %,d recs in | %,d recs out | %,d recs/sec | %6.3f secs | // %,d bytes ",map.size(), entriesCompacted,