Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect PreExecute and Consensus traces #2744

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions bftengine/src/bftengine/ReplicaImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,8 @@ void ReplicaImp::onCommitCombinedSigSucceeded(SeqNum seqNumber,
(seqNumber > lastExecutedSeqNum + config_.getconcurrencyLevel() + activeExecutions_);

auto span = concordUtils::startChildSpanFromContext(
commitFull->spanContext<std::remove_pointer<decltype(commitFull)>::type>(), "bft_execute_committed_reqs");
commitFull->spanContext<std::remove_pointer<decltype(commitFull)>::type>(),
"bft_handle_commit_combined_sig_succeeded_message");
updateCommitMetrics(CommitPath::SLOW);
startExecution(seqNumber, span, askForMissingInfoAboutCommittedItems);
}
Expand Down Expand Up @@ -2144,7 +2145,8 @@ void ReplicaImp::onCommitVerifyCombinedSigResult(SeqNum seqNumber, ViewNum view,
LOG_INFO(CNSUS, "Request committed, proceeding to try to execute" << KVLOG(view));

auto span = concordUtils::startChildSpanFromContext(
commitFull->spanContext<std::remove_pointer<decltype(commitFull)>::type>(), "bft_execute_committed_reqs");
commitFull->spanContext<std::remove_pointer<decltype(commitFull)>::type>(),
"bft_handle_commit_verify_combined_sig_result");
bool askForMissingInfoAboutCommittedItems =
(seqNumber > lastExecutedSeqNum + config_.getconcurrencyLevel() + activeExecutions_);
updateCommitMetrics(CommitPath::SLOW);
Expand Down Expand Up @@ -2203,7 +2205,7 @@ void ReplicaImp::onFastPathCommitCombinedSigSucceeded(SeqNum seqNumber,
lastExecutedSeqNum + config_.getconcurrencyLevel() + activeExecutions_); // TODO(GG): check/improve this logic

auto span = concordUtils::startChildSpanFromContext(fcp->spanContext<std::remove_pointer<decltype(fcp)>::type>(),
"bft_execute_committed_reqs");
"bft_handle_fast_path_commit_combined_sig_succeeded");

updateCommitMetrics(cPath);

Expand Down Expand Up @@ -2268,7 +2270,7 @@ void ReplicaImp::onFastPathCommitVerifyCombinedSigResult(SeqNum seqNumber,
lastExecutedSeqNum + config_.getconcurrencyLevel() + activeExecutions_); // TODO(GG): check/improve this logic

auto span = concordUtils::startChildSpanFromContext(fcp->spanContext<std::remove_pointer<decltype(fcp)>::type>(),
"bft_execute_committed_reqs");
"bft_handle_fast_path_commit_verify_combined_sig_result");

updateCommitMetrics(cPath);

Expand Down Expand Up @@ -4997,14 +4999,14 @@ void ReplicaImp::executeSpecialRequests(PrePrepareMsg *ppMsg,
reqIdx++;
}

auto span_context = ppMsg->spanContext<std::remove_pointer<decltype(ppMsg)>::type>();
// TODO(GG): the following code is cumbersome. We can call to execute directly in the above loop
IRequestsHandler::ExecutionRequestsQueue singleRequest;
for (IRequestsHandler::ExecutionRequest &req : accumulatedRequests) {
ConcordAssert(singleRequest.empty());
singleRequest.push_back(req);
{
const concordUtils::SpanContext &span_context{""};
auto span = concordUtils::startChildSpanFromContext(span_context, "bft_client_request");
auto span = concordUtils::startChildSpanFromContext(span_context, "bft_client_special_request");
span.setTag("rid", config_.getreplicaId());
span.setTag("cid", req.cid);
span.setTag("seq_num", req.requestSequenceNum);
Expand Down Expand Up @@ -5067,12 +5069,12 @@ void ReplicaImp::executeRequests(PrePrepareMsg *ppMsg, Bitmap &requestSet, Times
setConflictDetectionBlockId(req, pAccumulatedRequests->back());
}
}
auto span_context = ppMsg->spanContext<std::remove_pointer<decltype(ppMsg)>::type>();
if (ReplicaConfig::instance().blockAccumulation) {
LOG_DEBUG(GL,
"Executing all the requests of preprepare message with cid: " << ppMsg->getCid() << " with accumulation");
{
// TimeRecorder scoped_timer1(*histograms_.executeWriteRequest);
const concordUtils::SpanContext &span_context{""};
auto span = concordUtils::startChildSpanFromContext(span_context, "bft_client_request");
span.setTag("rid", config_.getreplicaId());
span.setTag("cid", ppMsg->getCid());
Expand All @@ -5095,7 +5097,6 @@ void ReplicaImp::executeRequests(PrePrepareMsg *ppMsg, Bitmap &requestSet, Times
singleRequest.push_back(req);
{
// TimeRecorder scoped_timer1(*histograms_.executeWriteRequest);
const concordUtils::SpanContext &span_context{""};
auto span = concordUtils::startChildSpanFromContext(span_context, "bft_client_request");
span.setTag("rid", config_.getreplicaId());
span.setTag("cid", ppMsg->getCid());
Expand Down