MCPcopy Create free account
hub / github.com/apache/brpc / ResetSpanDB

Function ResetSpanDB

src/brpc/span.cpp:544–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542}
543
544static void ResetSpanDB(SpanDB* db) {
545 SpanDB* old_db = NULL;
546 {
547 BAIDU_SCOPED_LOCK(g_span_db_mutex);
548 old_db = g_span_db;
549 g_span_db = db;
550 if (g_span_db) {
551 g_span_db->AddRefManually();
552 }
553 }
554 if (old_db) {
555 old_db->RemoveRefManually();
556 }
557}
558
559static void RemoveSpanDB() {
560 g_span_ending = true;

Callers 2

RemoveSpanDBFunction · 0.85
dump_to_dbMethod · 0.85

Calls 2

AddRefManuallyMethod · 0.45
RemoveRefManuallyMethod · 0.45

Tested by

no test coverage detected