Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-705

Use new getMore server command to read capped collections

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0-beta0
    • Affects Version/s: 1.1.7
    • Component/s: libmongoc
    • None

      By looking at the implementation of _mongoc_cursor_get_more() https://github.com/mongodb/mongo-c-driver/blob/53682560c307a806bb41c37232e8d4ec182df3ba/src/mongoc/mongoc-cursor.c#L574
      the code is still using OP_GET_MORE path to read from capped collections.
      Based on this jira issue: https://jira.mongodb.org/browse/SERVER-18184, it will be convenient to add support for reading from capped collection using new getMore command given the fact next version of mongodb adds support for blocking awaitData.
      Until this is released, when tailing in capped collections, MondoDB does busy waiting creating a non-scalable scenario when there's a lot of clients waiting for data on a capped collections.
      The mentioned Jira issue fixes this problem, but only if going thru getMore path not if using OP_GET_MORE command.
      For that there's another issue in Jira https://jira.mongodb.org/browse/SERVER-18841, but it has no resolution date.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jsbattig@convey.com Jose Battig
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: