Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update expensify_prod branch #2036

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions sqlitecluster/SQLiteNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1259,12 +1259,6 @@ void SQLiteNode::_onMESSAGE(SQLitePeer* peer, const SData& message) {
peer->latency = max(STimeNow() - message.calc64("Timestamp"), 1ul);
SINFO("Received PONG from peer '" << peer->name << "' (" << peer->latency/1000 << "ms latency)");
return;
} else if (SIEquals(message.methodLine, "NODE_LOGIN")) {
// We need to return early here to ignore this deprecated message and avoid throwing:
// STHROW("not logged in");
// Below. We can remove this check after one more deploy cycle.
// https://github.com/Expensify/Expensify/issues/450953
return;
}

// We ignore everything except PING and PONG from forked nodes, so we can return here in that case.
Expand Down Expand Up @@ -2559,10 +2553,7 @@ void SQLiteNode::postPoll(fd_map& fdm, uint64_t& nextActivity) {
int messageSize = message.deserialize(socket->recvBuffer);
if (messageSize) {
socket->recvBuffer.consumeFront(messageSize);
// Old nodes, for one more upgrade cycle, will still send `NODE_LOGIN`. We can remove this check after this
// code is deployed.
// See: https://github.com/Expensify/Expensify/issues/450953
if (SIEquals(message.methodLine, "NODE_LOGIN") || SIEquals(message.methodLine, "LOGIN")) {
if (SIEquals(message.methodLine, "LOGIN")) {
SQLitePeer* peer = getPeerByName(message["Name"]);
if (peer) {
if (peer->setSocket(socket)) {
Expand Down