Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions src/workerd/io/io-context.c++
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@ IoContext::IncomingRequest::~IoContext_IncomingRequest() noexcept(false) {
}
}

context->incomingRequests.remove(*this);

KJ_IF_SOME(a, context->actor) {
a.getMetrics().endRequest();
}
Expand All @@ -338,6 +336,10 @@ IoContext::IncomingRequest::~IoContext_IncomingRequest() noexcept(false) {
context->waitUntilTasks.clear();
}
}

// Remove incoming request after canceling waitUntil tasks, which may have spans attached that
// require accessing a timer from the active request.
context->incomingRequests.remove(*this);
}

InputGate::Lock IoContext::getInputLock() {
Expand Down
4 changes: 2 additions & 2 deletions src/workerd/io/tracer.c++
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ void BaseTracer::adjustSpanTime(tracing::CompleteSpan& span) {
KJ_FAIL_ASSERT(
"reported span without current request", span.operationName, hasCompleteTime);
} else {
LOG_NOSENTRY(WARNING, "reported span without current request", span.operationName,
hasCompleteTime);
LOG_WARNING_PERIODICALLY(
"reported span without current request", span.operationName, hasCompleteTime);
}
}
});
Expand Down
Loading