Skip to content

Commit

Permalink
fix tsan alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 committed Jan 22, 2025
1 parent 04f4156 commit f3cb9d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ void TFetchingScript::Allocation(const std::set<ui32>& entityIds, const EStageFe

TString IFetchingStep::DebugString() const {
TStringBuilder sb;
sb << "name=" << Name << ";duration=" << SumDuration << ";"
<< "size=" << 1e-9 * SumSize << ";details={" << DoDebugString() << "};";
sb << "name=" << Name << ";duration=" << TDuration::MicroSeconds(SumDurationUs.Val()) << ";"
<< "size=" << 1e-9 * SumSize.Val() << ";details={" << DoDebugString() << "};";
return sb;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class TFetchingStepsSignalsCollection: public NColumnShard::TCommonCountersOwner
class IFetchingStep: public TNonCopyable {
private:
YDB_READONLY_DEF(TString, Name);
YDB_READONLY(TDuration, SumDuration, TDuration::Zero());
YDB_READONLY(ui64, SumSize, 0);
YDB_READONLY_DEF(TAtomicCounter, SumDurationUs);
YDB_READONLY_DEF(TAtomicCounter, SumSize);
TFetchingStepSignals Signals;

protected:
Expand All @@ -79,11 +79,11 @@ class IFetchingStep: public TNonCopyable {

public:
void AddDuration(const TDuration d) {
SumDuration += d;
SumDurationUs.Add(d.MicroSeconds());
Signals.AddDuration(d);
}
void AddDataSize(const ui64 size) {
SumSize += size;
SumSize.Add(size);
Signals.AddBytes(size);
}

Expand Down

0 comments on commit f3cb9d9

Please sign in to comment.