use of org.voltdb.exceptions.SerializableException in project voltdb by VoltDB.
the class MpTransactionState method pollForResponses.
private FragmentResponseMessage pollForResponses() {
FragmentResponseMessage msg = null;
try {
final String snapShotRestoreProcName = "@SnapshotRestore";
while (msg == null) {
msg = m_newDeps.poll(60L * 5, TimeUnit.SECONDS);
if (msg == null && !snapShotRestoreProcName.equals(m_initiationMsg.getStoredProcedureName())) {
tmLog.warn("Possible multipartition transaction deadlock detected for: " + m_initiationMsg);
if (m_remoteWork == null) {
tmLog.warn("Waiting on local BorrowTask response from site: " + CoreUtils.hsIdToString(m_buddyHSId));
} else {
tmLog.warn("Waiting on remote dependencies: ");
for (Entry<Integer, Set<Long>> e : m_remoteDeps.entrySet()) {
tmLog.warn("Dep ID: " + e.getKey() + " waiting on: " + CoreUtils.hsIdCollectionToString(e.getValue()));
}
}
m_mbox.send(com.google_voltpatches.common.primitives.Longs.toArray(m_useHSIds), new DumpMessage());
}
}
} catch (InterruptedException e) {
// could retry; but this is unexpected. Crash.
throw new RuntimeException(e);
}
SerializableException se = msg.getException();
if (se != null && se instanceof TransactionRestartException) {
// If this is a restart exception, we don't need to match up the DependencyId
setNeedsRollback(true);
throw se;
}
return msg;
}
Aggregations