Skip to content

Commit

Permalink
delete has no more data after the key (#53886)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
t-vi authored and facebook-github-bot committed Mar 15, 2021
1 parent 700c817 commit 8734e88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/lib/c10d/TCPStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ int64_t TCPStore::add(const std::string& key, int64_t value) {
bool TCPStore::deleteKey(const std::string& key) {
std::string regKey = regularPrefix_ + key;
tcputil::sendValue<QueryType>(storeSocket_, QueryType::DELETE_KEY);
tcputil::sendString(storeSocket_, regKey, true);
tcputil::sendString(storeSocket_, regKey);
auto numDeleted = tcputil::recvValue<int64_t>(storeSocket_);
return (numDeleted == 1);
}
Expand Down

0 comments on commit 8734e88

Please sign in to comment.