Hi Kesav,
Thanks for the reply,
As per the discussion, the following is the requested data. Please review it once.
- Can you share your hardware spec, like the WT cache changes from its default size and how have you deployed this?
Are you using separate hardware for each node?
For WT cache changes I didn’t change anything yet, and for hardware resources, yes we are using separate hardware resources for each node as follows
Mongos : RAM - 30 GB, CPU cores- 8, HardDisk-100 GB
Config: RAM - 15 GB , CPU cores - 4 HardDisk - 100GB
3_Data_Nodes_Each: 30 GB , CPU cores - 8 and HardDisk - 500GB
2)Furthermore, to gain a better understanding of the issue, please provide the following information:
The sample documents of your collections, and the expected output that you are seeking.
{
"_id" : ObjectId("6401cff277a245291028fd82"),
"storeId" : NumberLong(1360255),
"storeName" : "New Kumbharwada UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(3345885),
"productName" : "bOPV (dose)",
"productBadgeId" : NumberLong(2),
"productBadgeName" : "RI Vaccines",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 4,
"txnTypeName" : "Stock-Discards",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(40),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
{
"_id" : ObjectId("6401cff277a245291028fd81"),
"storeId" : NumberLong(1360255),
"storeName" : "New Kumbharwada UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(10),
"productName" : "OPEN bOPV (vial)",
"productBadgeId" : NumberLong(3),
"productBadgeName" : "OPEN Vials",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 4,
"txnTypeName" : "Stock-Discards",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(3),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
{
"_id" : ObjectId("6401cff277a245291028fd80"),
"storeId" : NumberLong(1360255),
"storeName" : "New Kumbharwada UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(3345907),
"productName" : "Pentavalent (dose)",
"productBadgeId" : NumberLong(2),
"productBadgeName" : "RI Vaccines",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 4,
"txnTypeName" : "Stock-Discards",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(20),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
{
"_id" : ObjectId("6401cf7a934eee407add02d8"),
"storeId" : NumberLong(1356656),
"storeName" : "Akhlol UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(10),
"productName" : "OPEN bOPV (vial)",
"productBadgeId" : NumberLong(3),
"productBadgeName" : "OPEN Vials",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 4,
"txnTypeName" : "Stock-Discards",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(3),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
{
"_id" : ObjectId("6401cf7a934eee407add02d7"),
"storeId" : NumberLong(1356658),
"storeName" : "Bharatnagar UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(3345885),
"productName" : "bOPV (dose)",
"productBadgeId" : NumberLong(2),
"productBadgeName" : "RI Vaccines",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 4,
"txnTypeName" : "Stock-Discards",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(40),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
{
"_id" : ObjectId("6401cf7a934eee407add02d6"),
"storeId" : NumberLong(1356658),
"storeName" : "Bharatnagar UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(3345907),
"productName" : "Pentavalent (dose)",
"productBadgeId" : NumberLong(2),
"productBadgeName" : "RI Vaccines",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 4,
"txnTypeName" : "Stock-Discards",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(20),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
{
"_id" : ObjectId("6401cf7a934eee407add02d5"),
"storeId" : NumberLong(1356656),
"storeName" : "Akhlol UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(3345907),
"productName" : "Pentavalent (dose)",
"productBadgeId" : NumberLong(2),
"productBadgeName" : "RI Vaccines",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 4,
"txnTypeName" : "Stock-Discards",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(20),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
{
"_id" : ObjectId("6401cf7a934eee407add02d4"),
"storeId" : NumberLong(1356658),
"storeName" : "Bharatnagar UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(10),
"productName" : "OPEN bOPV (vial)",
"productBadgeId" : NumberLong(3),
"productBadgeName" : "OPEN Vials",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 4,
"txnTypeName" : "Stock-Discards",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(3),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
{
"_id" : ObjectId("6401cf7a934eee407add02d3"),
"storeId" : NumberLong(1356656),
"storeName" : "Akhlol UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(3345885),
"productName" : "bOPV (dose)",
"productBadgeId" : NumberLong(2),
"productBadgeName" : "RI Vaccines",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 4,
"txnTypeName" : "Stock-Discards",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(40),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
{
"_id" : ObjectId("6401cefd77a2452910289d52"),
"storeId" : NumberLong(1356656),
"storeName" : "Akhlol UHC",
"storeBadgeId" : NumberLong(279),
"storeBadgeName" : "MCCCP",
"productId" : NumberLong(3345879),
"productName" : "OPEN Pentavalent (vial)",
"productBadgeId" : NumberLong(3),
"productBadgeName" : "OPEN Vials",
"txnStringDate" : "2023-03-03",
"txnDate" : ISODate("2023-03-03T00:00:00Z"),
"txnTypeId" : 2,
"txnTypeName" : "Stock-In",
"stateId" : NumberLong(351),
"stateName" : "Gujarat",
"districtId" : NumberLong(2030),
"districtName" : "Bhavnagar",
"isDeleted" : false,
"stock" : NumberLong(10),
"pranthId" : NumberLong(1344239),
"month" : "Mar",
"year" : "2023",
"initialTxnDate" : ISODate("2023-03-03T00:00:00Z"),
"initialTxnStringDate" : "2023-03-03",
"_class" : "com.dipl.evinae.reports.mongo.entity.TxnCountLogDetails"
}
- How many different values does the shard key contain?
Shard Key provided as a data key, hence shard key existing values from “txnDate” :
ISODate("2021-08-02T00:00:00Z") to txnDate" : ISODate("2023-03-03T00:00:00Z")
- What MongoDB version you are using?
currently, it’s 4.4.16
Thanks & Regards,
Ramesh.