Operations that use $where in a query cause the server to read the system.js collection sometimes.
The way it is implemented is based on a DBDirectClient that iterates a find on it. This operation inherits the writeConcern from the parent operation. As a result, if there are a large number of entries present in the collection the cursor will perform a getMore operation.
This will cause the operation to wait for write concern since getMore supports it.
- is related to
-
SERVER-25468 Using DBDirectClient trips invariant failure about lock state in ReplicationCoordinatorImpl::waitUntilOpTimeForRead()
-
- Closed
-
-
SERVER-87285 Make the default find batch size configurable and fuzz in testing
-
- Closed
-
- related to
-
SERVER-87319 Replace invariant with tassert in awaitReplication
-
- Closed
-