Skip to content

Commit

Permalink
YT-20430: Drop EPollablePriority
Browse files Browse the repository at this point in the history
c44335fe13601ff82f864a11f1947a605a91c48e
  • Loading branch information
AlexeyLukyanchikov committed Jul 13, 2024
1 parent b922978 commit 48de94f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 34 deletions.
10 changes: 0 additions & 10 deletions yt/yt/core/bus/tcp/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,6 @@ void TTcpConnection::RunPeriodicCheck()
}
}

EPollablePriority TTcpConnection::GetPriority() const
{
switch (MultiplexingBand_.load(std::memory_order::relaxed)) {
case EMultiplexingBand::RealTime:
return EPollablePriority::RealTime;
default:
return EPollablePriority::Normal;
}
}

const TString& TTcpConnection::GetLoggingTag() const
{
return LoggingTag_;
Expand Down
1 change: 0 additions & 1 deletion yt/yt/core/bus/tcp/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class TTcpConnection
TBusNetworkStatistics GetBusStatistics() const;

// IPollable implementation.
NConcurrency::EPollablePriority GetPriority() const override;
const TString& GetLoggingTag() const override;
void OnEvent(NConcurrency::EPollControl control) override;
void OnShutdown() override;
Expand Down
5 changes: 0 additions & 5 deletions yt/yt/core/concurrency/pollable_detail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ void* TPollableBase::GetCookie() const
return Cookie_.Get();
}

EPollablePriority TPollableBase::GetPriority() const
{
return EPollablePriority::Normal;
}

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT::NConcurrency
2 changes: 0 additions & 2 deletions yt/yt/core/concurrency/pollable_detail.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class TPollableBase
void SetCookie(TCookiePtr cookie) override;
void* GetCookie() const override;

EPollablePriority GetPriority() const override;

private:
TCookiePtr Cookie_;
};
Expand Down
11 changes: 0 additions & 11 deletions yt/yt/core/concurrency/poller.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ DEFINE_BIT_ENUM(EPollControl,
((Shutdown) (0x400)) // Shutdown in progress (for external use)
);

//! Poller may provide separate sets of threads for handling pollables of
//! various priorities.
DEFINE_ENUM(EPollablePriority,
((Normal) (0))
((RealTime) (1))
);

////////////////////////////////////////////////////////////////////////////////

//! Describes an FD-backed pollable entity.
Expand All @@ -50,10 +43,6 @@ struct IPollable
//! Returns a human-readable string used for diagnostic purposes.
virtual const TString& GetLoggingTag() const = 0;

//! Returns the priority of this pollable.
//! The result need not be stable (i.e. may vary across calls).
virtual EPollablePriority GetPriority() const = 0;

//! Called by the poller when the appropriate event is triggered for the FD.
virtual void OnEvent(EPollControl control) = 0;

Expand Down
5 changes: 0 additions & 5 deletions yt/yt/core/concurrency/unittests/thread_pool_poller_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ class TPollableMock
return LoggingTag_;
}

EPollablePriority GetPriority() const override
{
return EPollablePriority::Normal;
}

void OnEvent(EPollControl control) override
{
// NB: Retry is the only event we trigger in this unittest via |IPoller::Retry|.
Expand Down

0 comments on commit 48de94f

Please sign in to comment.