Skip to content

Commit 8734e88

Browse files
t-vifacebook-github-bot
authored andcommitted
delete has no more data after the key (#53886)
Summary: The tcpstore delete key implementation inadvertendly set "moreData" when sending the key when it was in fact the last message. Thank you, PetrochukM, for the reproducing example which was instrumental in developing the fix (and is the blueprint for the test case). Fixes #53872 Pull Request resolved: #53886 Reviewed By: jbschlosser Differential Revision: D27011846 Pulled By: H-Huang fbshipit-source-id: 5c460d1e4d095a8bc267bf63613b556856ced3e8
1 parent 700c817 commit 8734e88

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

torch/lib/c10d/TCPStore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ int64_t TCPStore::add(const std::string& key, int64_t value) {
511511
bool TCPStore::deleteKey(const std::string& key) {
512512
std::string regKey = regularPrefix_ + key;
513513
tcputil::sendValue<QueryType>(storeSocket_, QueryType::DELETE_KEY);
514-
tcputil::sendString(storeSocket_, regKey, true);
514+
tcputil::sendString(storeSocket_, regKey);
515515
auto numDeleted = tcputil::recvValue<int64_t>(storeSocket_);
516516
return (numDeleted == 1);
517517
}

0 commit comments

Comments
 (0)