aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivanmorozov <ivanmorozov@yandex-team.com>2023-08-11 10:33:36 +0300
committerivanmorozov <ivanmorozov@yandex-team.com>2023-08-11 11:12:04 +0300
commitfd7c47251710d4b4ada857f26ac35460e65c3422 (patch)
treeee8fe1b5de73228e1b280456eca73bd423341fad
parent7591c25dd12008de9b434e6f4d62bee122bb9d38 (diff)
downloadydb-fd7c47251710d4b4ada857f26ac35460e65c3422.tar.gz
fix thread sanitizer panic
-rw-r--r--ydb/core/tx/columnshard/counters/common/client.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/ydb/core/tx/columnshard/counters/common/client.h b/ydb/core/tx/columnshard/counters/common/client.h
index 632aa24817..2437c3decb 100644
--- a/ydb/core/tx/columnshard/counters/common/client.h
+++ b/ydb/core/tx/columnshard/counters/common/client.h
@@ -4,14 +4,27 @@
#include <util/generic/noncopyable.h>
#include <list>
#include <memory>
+#include <atomic>
namespace NKikimr::NColumnShard {
class TValueAggregationAgent;
class TValueAggregationClient: TNonCopyable {
private:
- YDB_ACCESSOR(i64, Value, 0);
+ std::atomic<i64> Value;
public:
+ TValueAggregationClient() {
+ Value = 0;
+ }
+
+ i64 GetValue() const {
+ return Value;
+ }
+
+ void SetValue(const i64 value) {
+ Value = value;
+ }
+
void Add(const i64 v) {
Value += v;
}