show a stacktrace when the logflusher dies
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java
index 42172b0..0f1e2e1 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java
@@ -432,24 +432,29 @@
@Override
public Boolean call() {
- synchronized (isStarted) {
- isStarted.set(true);
- isStarted.notify();
- }
- while (true) {
- flushPage = null;
- try {
- flushPage = flushQ.take();
- if (flushPage == POISON_PILL || terminateFlag.get()) {
- return true;
- }
- } catch (InterruptedException e) {
- if (flushPage == null) {
- continue;
- }
+ try {
+ synchronized (isStarted) {
+ isStarted.set(true);
+ isStarted.notify();
}
- flushPage.flush();
- emptyQ.offer(flushPage);
+ while (true) {
+ flushPage = null;
+ try {
+ flushPage = flushQ.take();
+ if (flushPage == POISON_PILL || terminateFlag.get()) {
+ return true;
+ }
+ } catch (InterruptedException e) {
+ if (flushPage == null) {
+ continue;
+ }
+ }
+ flushPage.flush();
+ emptyQ.offer(flushPage);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw e;
}
}
}
\ No newline at end of file