Skip to content

bugs for the GetWriteToSNDone() check in ProcessResp_SN #24

Open
@gxflying

Description

@gxflying

Hi sir,
I found there may a bug in the ProcessResp_SN @L2663,
because SetWriteToSNDone is called in two place:
1. req->SetWriteToSNDone(true); @L2653
2. req->SetWriteToSNDone(true); @L2694 which will never be called, because the code only run to L2694 when the return value of GetWriteToSNDone() is already true !

so the condition @ L2663 can only be true because the code ran to L2653 ever

but the code can only run to L2653 when the Comp from SN has already received which is when both condition below are true

  1. (rsp.IsCompDBIDResp() || rsp.IsDBIDResp()) @L2609
  2. (rsp.IsCompDBIDResp() || req->GetCompSNReceived()) @ L2622

so when the Comp from RN aready is reveived by INC, it will never be reveived again , so the branch if (req->GetWriteToSNDone()) @L2663 seems useless !

if (req->GetWriteToSNDone()) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions