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

Investigate correct maxTimeMS behavior for per-shard cursors

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      during SERVER-62738 the maxTimeMS behavior we got out of the box is that mongos will swallow a network timeout and return an empty batch. The design currently says that in this senario an error should be returned, not an empty batch.

      // using helpers from jstests/noPassthrough/change_streams_per_shard_cursor.js
      [sdb, st, shardId] = startSharded(true);
      c = pscWatch(sdb, "coll", shardId);
      c._maxAwaitTimeMS = 10000;
      st.shard0.adminCommand({configureFailPoint: 'waitAfterPinningCursorBeforeGetMoreBatch',
                              mode: 'alwaysOn', data: {nss: dbName+".coll"}});
      assert(!c.isExhausted());
      print("getting next");
      c.hasNext(); // According to the design this should raise an error
      print("got batch");
      
      st.stop();
      

            Assignee:
            mickey.winters@mongodb.com Mickey Winters
            Reporter:
            mickey.winters@mongodb.com Mickey Winters
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: