I have created a mongo 4.4 inside AKS with 2 collections. Database has 3 shards.
Collection1: (_id: number ,TargetId:number, IsActive:boolean, …) (This has 3M records)
Collection2: (_id: hashed, OriginId:string, …)
Collection2 is sharded by _id:hashed (This spread equally in 3 shards)
Collection1 is sharded by SearchTargetId (all records are staying in shard2). Any idea?
If I shard based on _id hashed, my query says that should be included in query (findOneAndUpdateAsync)
Any idea how can I spread all records equally in 3 shards. I just switched to 4.4 just because of this feature, but it’s not working.