Commit fa0d48f3 authored by Phoebe Buckheister's avatar Phoebe Buckheister 🦎

meta: also copy HasSequenceNumber msghdr flag when sending to secondary

a message that is forwarded verbatim will have the flag set correctly,
but an AckNotify message (sent when processing on the primary fails)
would not. this can cause the secondary mirror message state maps to
grow without bounds.

a common cause for missing acks along this path is creat() and mkdir(),
since both send a LookupIntent that does not return success. the
sequence number acked by that message would be sent to the secondary in
an AckNotify message without the HasSequenceNumber flag - and thus
ignoried, leaving the mirror state slot for that seq# populated.

(cherry picked from commit 1daaf4a1dc1e4500795106b93f828a2c995d8f27)
parent 8c32cfda
......@@ -286,6 +286,7 @@ class MirroredMessage : public BaseT
// set flag here instead of at the beginning because &message == this is often used
message.addFlag(NetMessageHeader::Flag_BuddyMirrorSecond);
message.addFlag(this->getFlags() & NetMessageHeader::Flag_IsSelectiveAck);
message.addFlag(this->getFlags() & NetMessageHeader::Flag_HasSequenceNumber);
FhgfsOpsErr commRes = MessagingTk::requestResponseNode(&rrNode, &rrArgs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment