Skip to content

Commit 621a9ec

Browse files
authored
Merge pull request #9 from ClickHouse/vdimir/cherry-pick-tsan-fix
Cherry-pick fix for TSAN warning for mongoc_handshake_t::frozen
2 parents 036d59f + 56945e2 commit 621a9ec

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.tsan-suppressions

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
race:mongoc_counter*
2-
race:_mongoc_handshake_freeze

src/libmongoc/src/mongoc/mongoc-handshake.c

+2
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,9 @@ _mongoc_handshake_build_doc_with_application (const char *appname)
720720
void
721721
_mongoc_handshake_freeze (void)
722722
{
723+
bson_mutex_lock (&gHandshakeLock);
723724
_mongoc_handshake_get ()->frozen = true;
725+
bson_mutex_unlock (&gHandshakeLock);
724726
}
725727

726728
/*

0 commit comments

Comments
 (0)