-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
-
ALL
-
Execution Team 2023-12-11
Running the following once increases updateArrayFilters by 2 in serverStatus.metrics.update:
{ "update" : "testColl", "updates" : [ { "q" : { "_id" : 1, "timestamp" : ISODate("2021-05-18T00:00:00Z") }, "u" : { "$set" : { "a.$[i].b" : 7 } }, "arrayFilters" : [ { "i.b" : 6 } ] } ], "writeConcern" : { "w" : "majority" }, "lsid" : { "id" : UUID("7c4f9933-4a2a-4716-b6b8-f8e42fee6b3a") }, "txnNumber" : NumberLong(11) }
I think it is because this code means we go into this twice.
Maybe the incrementUpdateMetrics loop should be in a if(!isTimeseriesViewRequest || !opCtx->isRetryableWrite() || !opCtx->inMultiDocumentTransaction()) or similar ?
I added a TODO for this in a bulk_write js test comparing those metrics between bulkWrite and non-bulkWrite.