chenBright commented on code in PR #3421:
URL: https://github.com/apache/brpc/pull/3421#discussion_r3726789826
##########
src/brpc/span.cpp:
##########
@@ -335,7 +338,9 @@ void Span::ResetServerSpanName(const std::string&
full_method_name) {
}
void Span::submit(int64_t cpuwide_us) {
- // Note: this method is not called for client-side spans.
+ // Called for server spans and root client spans (those without a local
Review Comment:
It seems there are no root client spans. Please update the comments.
##########
src/brpc/span.cpp:
##########
@@ -581,13 +586,13 @@ inline int GetSpanDB(butil::intrusive_ptr<SpanDB>* db) {
}
void Span::Submit(std::shared_ptr<Span> span, int64_t cpuwide_time_us) {
- // Only submit spans without a local parent (i.e., server spans).
- // Server spans hold shared_ptr references to their child spans (via
_client_list),
- // ensuring child spans remain alive until the server span is submitted
and dumped.
- // Client spans are not submitted here because their lifetime is managed
by their
- // parent server span.
+ // Submit root spans without a local parent. Server spans and root client
Review Comment:
It seems there are no root client spans. Please update the comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]