Skip to content

Commit 37758b1

Browse files
Sriram Ganesandaverigby
authored andcommitted
MB-25875: Make getMultiFsReadCount into Couchbase::RelaxedAtomic<size_t>
A data race was observed while trying to read the getMultiFsReadCount between the background fetcher and the statistics snapshot task WARNING: ThreadSanitizer: data race (pid=9742) Read of size 8 at 0x7d8800012160 by thread T19: Previous write of size 8 at 0x7d8800012160 by thread T15: Change-Id: I0df032c89d11163937cbab9625d6572b193bd7f2 Reviewed-on: http://review.couchbase.org/82926 Reviewed-by: Manu Dhundi <[email protected]> Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]>
1 parent 506bc10 commit 37758b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engines/ep/src/kvstore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class KVStoreStats {
333333
Histogram<hrtime_t> snapshotHisto;
334334

335335
// Count and histogram filesystem read()s per getMulti() request
336-
size_t getMultiFsReadCount;
336+
Couchbase::RelaxedAtomic<size_t> getMultiFsReadCount;
337337
Histogram<uint32_t> getMultiFsReadHisto;
338338

339339
// Histogram of filesystem read()s per getMulti() request, divided by

0 commit comments

Comments
 (0)