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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.1.1
    • 2.1.0
    • Concurrency
    • None
    • ALL

    Description

      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; }

      }

      Attachments

        Activity

          People

            dwight@mongodb.com Dwight Merriman
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: