Driver can exhaust query pool if limit is reached on the first batch of a query

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.0.3, 3.1.0
    • Affects Version/s: 3.0.2
    • Component/s: Query Operations
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When a user specifies a limit on a find operation, and that limit is reached on the initial batch returned from OP_QUERY, the driver immediately attempts to kill the cursor via OP_KILL_CURSOR after reading the initial batch. The problem is that it does so by pulling another connection from the pool before the connection that was used for the OP_QUERY has been released back to the pool. This effectively doubles the number of connections required for find operations that specify a limit, and in the worst case can cause starvation, where all threads are waiting for connections but none are available.

              Assignee:
              Jeffrey Yemin
              Reporter:
              Jeffrey Yemin
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: