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

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

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

      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@mongodb.com Dwight Merriman
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: