when a cursor is timed out, other cursors may last longer than they should

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.1.0
    • Affects Version/s: 2.1.1
    • Component/s: Concurrency
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ClientCursor::idleTimeReport checks for timeouts in two loops. The timing information is only provided in the first loop, and because the first loop is short circuited the timing information may not be provided to all cursors.

      for ( CCById::iterator i = clientCursorsById.begin(); i != clientCursorsById.end(); ) {
      CCById::iterator j = i;
      i++;
      if( j->second->shouldTimeout( millis ) )

      { foundSomeToTimeout = true; break; }

      }

      ...

      for ( CCById::iterator i = clientCursorsById.begin(); i != clientCursorsById.end(); ) {
      CCById::iterator j = i;
      i++;
      if( j->second->shouldTimeout(0) )

      { numberTimedOut++; LOG(1) << "killing old cursor " << j->second->_cursorid << ' ' << j->second->_ns << " idle:" << j->second->idleTime() << "ms\n"; delete j->second; }

      }

              Assignee:
              Dwight Merriman
              Reporter:
              Aaron Staple (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: