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

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

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • 3
    • 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 Unassigned
            Reporter:
            paolo.polato@mongodb.com Paolo Polato
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: