Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2552

Message generated by emptyMoreResult() contains uninitialized resultFlags() and flags sent over the wire are nondeterministic

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.0
    • Affects Version/s: None
    • Component/s: Stability
    • None
    • ALL

      Unlike other places where a QueryResult is created, resultFlags() aren't initialized in this function:

      QueryResult* emptyMoreResult(long long cursorid)

      { BufBuilder b(32768); b.skip(sizeof(QueryResult)); QueryResult *qr = (QueryResult *) b.buf(); qr->cursorId = 0; // 0 indicates no more data to retrieve. qr->startingFrom = 0; qr->len = b.len(); qr->setOperation(opReply); qr->nReturned = 0; b.decouple(); return qr; }

      Not sure if this would cause a problem with any drivers, but might make sense to ensure we have a deterministic response in such cases.

            Assignee:
            aaron Aaron Staple
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: