|
When you run the following:
const st = new ShardingTest({shard: 1, rs: {nodes: 2}, configShard: true});
|
It ends up creating two shards (one config shard and one regular shard) whereas it should only create a config shard.
This can be confirmed by looking at the logs:
c20040| {"t":{"$date":"2023-09-29T22:14:48.864+00:00"},"s":"I", "c":"SHARDING", "id":21942, "ctx":"ShardingReady","msg":"Going to insert new entry for shard into config.shards","attr":{"shardType":"{ _id: \"config\", host: \"4e946117-c466-4605-9ca3-067c86db1ec2/ip-10-122-14-26:20040\", state: 1, topologyTime: Timestamp(1696025688, 39) }"}}
|
c20040| {"t":{"$date":"2023-09-29T22:14:57.939+00:00"},"s":"I", "c":"SHARDING", "id":21942, "ctx":"conn33","msg":"Going to insert new entry for shard into config.shards","attr":{"shardType":"{ _id: \"b1a038a0-3e94-45c8-ad50-7ab48a552d3c\", host: \"b1a038a0-3e94-45c8-ad50-7ab48a552d3c/ip-10-122-14-26:20042,ip-10-122-14-26:20043\", state: 1, topologyTime: Timestamp(1696025697, 8) }"}}
|
|