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

maxPasses assertion (on allocation failure) can make capped collection unreadable

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc3
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL

      The maxPasses assertion (triggered on repeated allocation failure from a capped collection) can leave capped collection in non iterable state. In particular

      • the capExtent extent can be empty (contain no documents)
      • it's possible to have capExtent non null and capFirstNewRecord null, in which case the capped cursors will not work properly

      Should also investigate when the maxPasses assertion can be triggered.

                  if( ++passes > maxPasses ) {
                      log() << "passes ns:" << ns << " len:" << len << " maxPasses: " << maxPasses << '\n';
                      log() << "passes max:" << maxCappedDocs() << " nrecords:" << stats.nrecords << " datasize: " << stats.datasize << endl;
                      massert( 10345 ,  "passes >= maxPasses in capped collection alloc", false );
                  }
      

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            aaron Aaron Staple
            Votes:
            1 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: