From f09f64eb9e86b17b2a442586d98210f8230fe664 Mon Sep 17 00:00:00 2001 From: Jin Hai Date: Thu, 12 Dec 2024 10:33:11 +0800 Subject: [PATCH] Fix thread race Signed-off-by: Jin Hai --- src/storage/invertedindex/memory_indexer.cppm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/invertedindex/memory_indexer.cppm b/src/storage/invertedindex/memory_indexer.cppm index 58c9c3ab2e..12f0a62096 100644 --- a/src/storage/invertedindex/memory_indexer.cppm +++ b/src/storage/invertedindex/memory_indexer.cppm @@ -183,6 +183,6 @@ private: UniquePtr buf_writer_; SegmentIndexEntry *segment_index_entry_{nullptr}; - SizeT mem_used_{0}; + Atomic mem_used_{0}; }; } // namespace infinity