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

search_getMore_batchSize.js should be resilient in case unnecessary prefetch was skipped

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • Fully Compatible
    • ALL
    • 0
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      In most cases, we expect that a $search request that uses pre-fetching but does not exhaust all results will pre-fetch one more batch than is actually needed to fulfill the request. Mongot should return the "prefetched" batch to mongod; when mongod then realizes it doesn't need any more results, it will ignore the unused results and send a KillCursor to mongot.

      It's possible, though unlikely, that mongod may realize fast enough that it doesn't need more results that it can send the KillCursor to mongot before the final batch is requested or received. search_getMore_batchSize.js should tolerate the off-chance that that happens. That was likely the cause of BF-37529.

            Assignee:
            will.buerger@mongodb.com Will Buerger
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: