use of org.voltdb.messaging.InitiateResponseMessage in project voltdb by VoltDB.
the class ProcedureRunnerNT method completeCall.
/**
* Send a response back to the proc caller. Refactored out of coreCall for both
* regular and exceptional paths.
*/
private void completeCall(ClientResponseImpl response) {
// if we're keeping track, calculate result size
if (m_perCallStats.samplingProcedure()) {
m_perCallStats.setResultSize(response.getResults());
}
m_statsCollector.endProcedure(response.getStatus() == ClientResponse.USER_ABORT, (response.getStatus() != ClientResponse.USER_ABORT) && (response.getStatus() != ClientResponse.SUCCESS), m_perCallStats);
// send the response to the caller
// must be done as IRM to CI mailbox for backpressure accounting
response.setClientHandle(m_clientHandle);
InitiateResponseMessage irm = InitiateResponseMessage.messageForNTProcResponse(m_ciHandle, m_ccxn.connectionId(), response);
m_mailbox.deliver(irm);
m_ntProcService.handleNTProcEnd(ProcedureRunnerNT.this);
}
use of org.voltdb.messaging.InitiateResponseMessage in project voltdb by VoltDB.
the class Iv2Trace method logInitiatorRxMsg.
public static void logInitiatorRxMsg(VoltMessage msg, long localHSId) {
if (IV2_TRACE_ENABLED) {
if (msg instanceof InitiateResponseMessage) {
InitiateResponseMessage iresp = (InitiateResponseMessage) msg;
String logmsg = "rxInitRsp %s from %s ciHandle %s txnId %s spHandle %s status %s";
iv2log.trace(String.format(logmsg, CoreUtils.hsIdToString(localHSId), CoreUtils.hsIdToString(iresp.m_sourceHSId), ClientInterfaceHandleManager.handleToString(iresp.getClientInterfaceHandle()), txnIdToString(iresp.getTxnId()), txnIdToString(iresp.getSpHandle()), respStatusToString(iresp.getClientResponseData().getStatus())));
} else if (msg instanceof FragmentResponseMessage) {
FragmentResponseMessage fresp = (FragmentResponseMessage) msg;
String logmsg = "rxFragRsp %s from %s txnId %s spHandle %s status %s";
iv2log.trace(String.format(logmsg, CoreUtils.hsIdToString(localHSId), CoreUtils.hsIdToString(fresp.m_sourceHSId), txnIdToString(fresp.getTxnId()), txnIdToString(fresp.getSpHandle()), fragStatusToString(fresp.getStatusCode())));
} else if (msg instanceof CompleteTransactionResponseMessage) {
CompleteTransactionResponseMessage cresp = (CompleteTransactionResponseMessage) msg;
String logmsg = "rxCompRsp %s from %s txnId %s spHandle %s SPI %s restart %s recovering %s";
iv2log.trace(String.format(logmsg, CoreUtils.hsIdToString(localHSId), CoreUtils.hsIdToString(cresp.m_sourceHSId), txnIdToString(cresp.getTxnId()), txnIdToString(cresp.getSpHandle()), txnIdToString(cresp.getSPIHSId()), cresp.isRestart(), cresp.isRecovering()));
} else if (msg instanceof DummyTransactionResponseMessage) {
DummyTransactionResponseMessage dresp = (DummyTransactionResponseMessage) msg;
String logmsg = "rxDummyRsp %s from %s to %s for txnId %s";
iv2log.trace(String.format(logmsg, CoreUtils.hsIdToString(localHSId), CoreUtils.hsIdToString(dresp.m_sourceHSId), txnIdToString(dresp.getSPIHSId()), txnIdToString(dresp.getTxnId())));
}
}
}
Aggregations