HBASE-3381 Interrupt of a region open comes across as a successful open; second attempt
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1052013 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
878c81346c
commit
8450cc6721
|
@ -158,9 +158,19 @@ public class OpenRegionHandler extends EventHandler {
|
|||
}
|
||||
// Is thread still alive? We may have left above loop because server is
|
||||
// stopping or we timed out the edit. Is so, interrupt it.
|
||||
if (t.isAlive() && !signaller.get()) {
|
||||
LOG.debug("Interrupting thread " + t);
|
||||
t.interrupt();
|
||||
if (t.isAlive()) {
|
||||
if (!signaller.get()) {
|
||||
// Thread still running; interrupt
|
||||
LOG.debug("Interrupting thread " + t);
|
||||
t.interrupt();
|
||||
}
|
||||
try {
|
||||
t.join();
|
||||
} catch (InterruptedException ie) {
|
||||
LOG.warn("Interrupted joining " +
|
||||
r.getRegionInfo().getRegionNameAsString(), ie);
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
// Was there an exception opening the region? This should trigger on
|
||||
// InterruptedException too. If so, we failed.
|
||||
|
|
Loading…
Reference in New Issue