[Cleanup] Remove unused method RendezvousMgrInterface::CleanupAll().

PiperOrigin-RevId: 306271233
Change-Id: I2cc278deab6bdb9f70d5bb9a7e8678d2969220bd
This commit is contained in:
Derek Murray 2020-04-13 11:21:28 -07:00 committed by TensorFlower Gardener
parent c93a91e0e0
commit 709f61ee06
4 changed files with 0 additions and 38 deletions

View File

@ -115,20 +115,6 @@ void BaseRendezvousMgr::Cleanup(int64 step_id) {
}
}
void BaseRendezvousMgr::CleanupAll() {
std::vector<Rendezvous*> rendezs;
{
mutex_lock l(mu_);
for (const auto& entry : table_) {
rendezs.push_back(entry.second);
}
table_.clear();
}
for (auto rendez : rendezs) {
StartAbortRendevous(rendez, errors::Aborted("Shutdown"));
}
}
BaseRemoteRendezvous::BaseRemoteRendezvous(const WorkerEnv* env, int64 step_id)
: env_(env),
step_id_(step_id),

View File

@ -88,9 +88,6 @@ class BaseRendezvousMgr : public RendezvousMgrInterface {
// periodically calls CleanupAll().
void Cleanup(int64 step_id) override;
// Removed all rendezvous.
void CleanupAll() override;
protected:
virtual BaseRemoteRendezvous* Create(int64 step_id,
const WorkerEnv* worker_env) = 0;

View File

@ -93,9 +93,6 @@ class RendezvousMgrInterface {
// TODO(zhifengc): Have a background thread in worker that
// periodically calls CleanupAll().
virtual void Cleanup(int64 step_id) = 0;
// Removes all rendezvous.
virtual void CleanupAll() = 0;
};
} // end namespace tensorflow

View File

@ -193,24 +193,6 @@ TEST_F(RpcRendezvousMgrTest, CancelAfterReceived) {
delete cm;
}
TEST_F(RpcRendezvousMgrTest, CleanupAll) {
const Rendezvous::ParsedKey key = MakeKey(Rendezvous::CreateKey(
"/job:mnist/replica:1/task:2/cpu:0", 7890,
"/job:mnist/replica:1/task:2/cpu:1", "foo", FrameAndIter(0, 0)));
{
const int64 step_id = 123;
RemoteRendezvous* rendez = rmgr_.Find(step_id);
TF_ASSERT_OK(rendez->Initialize(&worker_session_));
core::ScopedUnref unref(rendez);
Rendezvous::Args args;
TF_ASSERT_OK(rendez->Send(key, args, V("peach"), false));
rmgr_.CleanupAll();
Tensor val(DT_STRING);
bool val_dead = false;
EXPECT_TRUE(errors::IsAborted(rendez->Recv(key, args, &val, &val_dead)));
}
}
class DummyDeviceContext : public DeviceContext {
public:
explicit DummyDeviceContext(int stream_id) : stream_id_(stream_id) {}