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

Streams: set the batch size to 0 on watch calls

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Atlas Streams

       

      Setting the batch size of the watch to 0 will allow the server to return immediately and avoid having the operation run on the cluster even if the client crashes or abandons the cursor. 

      mongocxx::options::change_stream options;
      options.batch_size(0); // Send batchSize:0 to aggregate to have aggregate return immediately.
      mongocxx::change_stream stream = collection.watch(options); 

       

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            andrea.rahmanan@mongodb.com Andrea Rahmanan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: