[SERVER-68273] count11.js, geo_big_polygon3.js fail when mongos was just started up Created: 25/Jul/22  Updated: 12/Dec/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Vishnu Kaushik Assignee: Backlog - Cluster Scalability
Resolution: Unresolved Votes: 0
Labels: sharding-nyc-subteam2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-68152 explain_missing_collection.js fails w... Closed
Assigned Teams:
Cluster Scalability
Operating System: ALL
Participants:
Story Points: 3

 Description   

When count11.js is the first test that is run in the suite, it fails. Run the below suite to see the failure:

test_kind: js_test
 
selector:
  roots:
  - jstests/core/count11.js
 
executor:
  fixture:
    class: ShardedClusterFixture
    mongod_options:
      set_parameters:
        logComponentVerbosity:
          command: 4
        enableTestCommands: 1
    mongos_options:
      set_parameters:
        logComponentVerbosity:
          command: 4
        enableTestCommands: 1
    num_shards: 1
    num_rs_nodes_per_shard: 1

The test will pass if we run a single insert before the failing command runs. For example, if we ran db.randomColl.insert(...), then the test will pass.



 Comments   
Comment by Vishnu Kaushik [ 25/Jul/22 ]

I think there is an issue with mongos forwarding the requests to the shards. It seems like sometimes mongos isn't forwarding requests, causing this failure (the assert is firing because the query execution layer / whatever on the mongod didn't get to see the query, though it should have).

The shard primary prints the following out only when we run some CRUD command on the mongos beforehand:

[j0:s0:prim] {"t":{"$date":"2022-07-25T18:49:46.063+00:00"},"s":"D2", "c":"COMMAND",  "id":21965,   "ctx":"conn46","msg":"About to run the command","attr":{"db":"test","client":"127.0.0.1:58930","commandArgs":{"count":"count11","query":{"a":1},"readConcern":{"level":"local","provenance":"implicitDefault"},"shardVersion":{"t":{"$timestamp":{"t":0,"i":0}},"e":{"$oid":"000000000000000000000000"},"v":{"$timestamp":{"t":0,"i":0}}},"databaseVersion":{"uuid":{"$uuid":"6366eff4-52c6-41dd-a5eb-9599c147d437"},"timestamp":{"$timestamp":{"t":1658774985,"i":53}},"lastMod":1},"lsid":{"id":{"$uuid":"bc8cf3d7-92b2-478f-8ddb-af72e13f7aa5"},"uid":{"$binary":{"base64":"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=","subType":"0"}}},"$clusterTime":{"clusterTime":{"$timestamp":{"t":1658774986,"i":5}},"signature":{"hash":{"$binary":{"base64":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","subType":"0"}},"keyId":0}},"$configTime":{"$timestamp":{"t":1658774986,"i":5}},"$topologyTime":{"$timestamp":{"t":1658774984,"i":20}},"$client":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"6.0.0-rc10"},"os":{"type":"Linux","name":"Ubuntu","architecture":"x86_64","version":"18.04"},"mongos":{"host":"ip-10-122-8-120:20002","client":"127.0.0.1:41498","version":"6.0.0-rc13"}},"mayBypassWriteBlocking":false,"$db":"test"}}}
...
[j0:s0:prim] {"t":{"$date":"2022-07-25T18:49:46.066+00:00"},"s":"D2", "c":"COMMAND",  "id":21965,   "ctx":"conn46","msg":"About to run the command","attr":{"db":"test","client":"127.0.0.1:58930","commandArgs":{"create":"count11","capped":false,"readConcern":{"level":"local","provenance":"implicitDefault"},"writeConcern":{"w":"majority","wtimeout":0,"provenance":"implicitDefault"},"databaseVersion":{"uuid":{"$uuid":"6366eff4-52c6-41dd-a5eb-9599c147d437"},"timestamp":{"$timestamp":{"t":1658774985,"i":53}},"lastMod":1},"lsid":{"id":{"$uuid":"bc8cf3d7-92b2-478f-8ddb-af72e13f7aa5"},"uid":{"$binary":{"base64":"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=","subType":"0"}}},"$clusterTime":{"clusterTime":{"$timestamp":{"t":1658774986,"i":5}},"signature":{"hash":{"$binary":{"base64":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","subType":"0"}},"keyId":0}},"$configTime":{"$timestamp":{"t":1658774986,"i":5}},"$topologyTime":{"$timestamp":{"t":1658774984,"i":20}},"$client":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"6.0.0-rc10"},"os":{"type":"Linux","name":"Ubuntu","architecture":"x86_64","version":"18.04"},"mongos":{"host":"ip-10-122-8-120:20002","client":"127.0.0.1:41498","version":"6.0.0-rc13"}},"mayBypassWriteBlocking":false,"$db":"test"}}}

It does not print it out otherwise, leading me to think that the mongos is not forwarding the requests to the shard.

Generated at Thu Feb 08 06:10:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.