Skip to content

Commit df54692

Browse files
author
babenko
committed
YT-23050: Hazard pointers must not depend on logging
commit_hash:7c833b68ce964fed7a64782fdba37f45f6b0e6be
1 parent d17ef57 commit df54692

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

yt/yt/core/misc/hazard_ptr.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include "hazard_ptr.h"
22

3-
#include "private.h"
4-
53
#include <yt/yt/core/misc/singleton.h>
64
#include <yt/yt/core/misc/proc.h>
75
#include <yt/yt/core/misc/ring_queue.h>
@@ -25,10 +23,6 @@ using namespace NConcurrency;
2523

2624
////////////////////////////////////////////////////////////////////////////////
2725

28-
static constexpr auto& Logger = LockFreeLogger;
29-
30-
////////////////////////////////////////////////////////////////////////////////
31-
3226
namespace NDetail {
3327

3428
////////////////////////////////////////////////////////////////////////////////
@@ -325,16 +319,6 @@ bool THazardPointerManager::DoReclaimHazardPointers(THazardThreadState* threadSt
325319
retireList.push(item);
326320
});
327321

328-
YT_LOG_TRACE_IF(
329-
!protectedPointers.empty(),
330-
"Scanning hazard pointers (Candidates: %v, Protected: %v)",
331-
MakeFormattableView(TRingQueueIterableWrapper(retireList), [&] (auto* builder, auto item) {
332-
builder->AppendFormat("%v", TTaggedPtr<void>::Unpack(item.PackedPtr).Ptr);
333-
}),
334-
MakeFormattableView(protectedPointers, [&] (auto* builder, auto ptr) {
335-
builder->AppendFormat("%v", ptr);
336-
}));
337-
338322
size_t pushedCount = 0;
339323
auto popCount = retireList.size();
340324
while (popCount-- > 0) {

yt/yt/core/misc/hazard_ptr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
#include <yt/yt/core/concurrency/scheduler_api.h>
66

7-
#include <library/cpp/yt/logging/logger.h>
8-
97
#include <atomic>
108

119
namespace NYT {

0 commit comments

Comments
 (0)