use of org.voltdb.utils.VoltTrace in project voltdb by VoltDB.
the class ExecutionEngine method executePlanFragments.
/** Run multiple plan fragments */
public FastDeserializer executePlanFragments(int numFragmentIds, long[] planFragmentIds, long[] inputDepIds, Object[] parameterSets, DeterminismHash determinismHash, String[] sqlTexts, boolean[] isWriteFrags, int[] sqlCRCs, long txnId, long spHandle, long lastCommittedSpHandle, long uniqueId, long undoQuantumToken, boolean traceOn) throws EEException {
try {
// For now, re-transform undoQuantumToken to readOnly. Redundancy work in site.executePlanFragments()
m_fragmentContext = (undoQuantumToken == Long.MAX_VALUE) ? FragmentContext.RO_BATCH : FragmentContext.RW_BATCH;
// reset context for progress updates
m_startTime = 0;
m_logDuration = INITIAL_LOG_DURATION;
m_sqlTexts = sqlTexts;
if (traceOn) {
final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.SPSITE);
if (traceLog != null) {
traceLog.add(() -> VoltTrace.beginDuration("execplanfragment", "txnId", TxnEgo.txnIdToString(txnId), "partition", Integer.toString(m_partitionId)));
}
}
FastDeserializer results = coreExecutePlanFragments(m_currentBatchIndex, numFragmentIds, planFragmentIds, inputDepIds, parameterSets, determinismHash, isWriteFrags, sqlCRCs, txnId, spHandle, lastCommittedSpHandle, uniqueId, undoQuantumToken, traceOn);
if (traceOn) {
final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.SPSITE);
if (traceLog != null) {
traceLog.add(VoltTrace::endDuration);
}
}
m_plannerStats.updateEECacheStats(m_eeCacheSize, numFragmentIds - m_cacheMisses, m_cacheMisses, m_partitionId);
return results;
} finally {
// don't count any cache misses when there's an exception. This is a lie and they
// will still be used to estimate the cache size, but it's hard to count cache hits
// during an exception, so we don't count cache misses either to get the right ratio.
m_cacheMisses = 0;
m_sqlTexts = null;
m_fragmentContext = FragmentContext.UNKNOWN;
}
}
Aggregations