countDocuments() returns a CursorNotFound error when one of the queried shards is restarted

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      After SERVER-84340 introduced a new JS core suite triggering random step down events in the nodes of a ShardedClusterFixture, spurious test regressions have been observed, which may be resumed as follows:

      • a sharded collection with hashed shard key gets created on a two shards cluster; each shard owns one chunk of the collection
      • a coll.countDocuments({}) command (which resolves into an aggregation with 'primary' read preference) is issued through one of the mongos processes of the cluster
      • between the establishment of the cursor and the consumption of the first results, the primary node of one shard is restarted, raising a CursorNotFound.

      --> the error code gets unexpectedly returned to the test environment (instead of being remapped to a retriable one).

              Assignee:
              Unassigned
              Reporter:
              Paolo Polato
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: