diff --git a/db/column_family.h b/db/column_family.h index 2092deed4d8a54842bfc04d047b4e700a36b072c..9a125aa1cf3cf42ed63ce96203a4cfef530f4188 100644 --- a/db/column_family.h +++ b/db/column_family.h @@ -194,7 +194,7 @@ class ColumnFamilyData { // *) delete all memory associated with that column family // *) delete all the files associated with that column family void SetDropped(); - bool IsDropped() const { return dropped_; } + bool IsDropped() const { return dropped_.load(std::memory_order_relaxed); } // thread-safe int NumberLevels() const { return ioptions_.num_levels; } @@ -358,7 +358,7 @@ class ColumnFamilyData { std::atomic refs_; // outstanding references to ColumnFamilyData std::atomic initialized_; - bool dropped_; // true if client dropped it + std::atomic dropped_; // true if client dropped it const InternalKeyComparator internal_comparator_; std::vector>