Skip to content

Commit

Permalink
Halt TabletServer on minc failure and no TabletServer lock
Browse files Browse the repository at this point in the history
Related to apache#5137
  • Loading branch information
dlmarion committed Dec 12, 2024
1 parent be9fa22 commit 1af1fd1
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1af1fd1

Please sign in to comment.