Details
Description
This is a regression introduced with OAK-7645 when the MongoDB Java driver was updated to 3.8.
With the switch to the new driver, the use of a deprecated method count() was replaced with countDocuments(). The method countDocument() behaves differently and performs an aggregation command over all documents in the collection. The MongoDB log would then show something like:
2018-12-12T18:40:53.672+0100 I COMMAND [conn6063] command oak.nodes command: aggregate { aggregate: "nodes", readConcern: { level: "local" }, pipeline: [ { $match: {} }, { $group: { _id: null, n: { $sum: 1 } } } ], cursor: {}, $db: "oak", $readPreference: { mode: "primaryPreferred" } } planSummary: COLLSCAN keysExamined:0 docsExamined:4038809 cursorExhausted:1 numYields:31584 nreturned:1 reslen:127 locks:{ Global: { acquireCount: { r: 31586 } }, Database: { acquireCount: { r: 31586 } }, Collection: { acquireCount: { r: 31586 } } } protocol:op_msg 1642ms
Attachments
Issue Links
- relates to
-
OAK-7645 Update to MongoDB Java driver 3.8
- Closed