Skip to content

Commit

Permalink
fix thread sanitizer alert (#13578)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 authored Jan 20, 2025
1 parent 7c328ef commit decee74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void TFetchingScript::Allocation(const std::set<ui32>& entityIds, const EStageFe

TString IFetchingStep::DebugString() const {
TStringBuilder sb;
sb << "name=" << Name << ";duration=" << SumDuration << ";"
sb << "name=" << Name << ";duration=" << GetSumDuration() << ";"
<< "size=" << 1e-9 * SumSize << ";details={" << DoDebugString() << "};";
return sb;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class TFetchingStepsSignalsCollection: public NColumnShard::TCommonCountersOwner
class IFetchingStep: public TNonCopyable {
private:
YDB_READONLY_DEF(TString, Name);
YDB_READONLY(TDuration, SumDuration, TDuration::Zero());
TAtomicCounter SumDuration;
YDB_READONLY(ui64, SumSize, 0);
TFetchingStepSignals Signals;

Expand All @@ -78,8 +78,12 @@ class IFetchingStep: public TNonCopyable {
}

public:
TDuration GetSumDuration() const {
return TDuration::MicroSeconds(SumDuration.Val());
}

void AddDuration(const TDuration d) {
SumDuration += d;
SumDuration.Add(d.MicroSeconds());
Signals.AddDuration(d);
}
void AddDataSize(const ui64 size) {
Expand Down

0 comments on commit decee74

Please sign in to comment.