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

Limit memory usage for bulkWrite (mongos)

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Fully Compatible
    • Repl 2024-01-22

      Mongos can't use remoteCursors for bulkWrite like other cluster commands because it will need to consume write results from the shards first before determining what to do next as a router. Given this nature of a router, mongos needs to cache response for each individual WriteOp. And there is no memory limit for it today.

      Similar to SERVER-76026, this ticket is to limit memory usage (e.g. capped at 100MB) for the WriteOp responses cached on mongos. And this will effectively also limit memory usage for each bulkWrite response cursor.

      The end goal is to limit the memory usage when we build or cache responses for bulkWrite ops. Once this limit is hit, we should stop executing the remaining operations in this bulkWrite.

            Assignee:
            sean.zimmerman@mongodb.com Sean Zimmerman
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: