-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.1.0, 7.3.3
-
Component/s: Query
-
None
Hello
It seems that since upgrading to mongoid 7.3.3 we're facing unexpected find by id queries being generated by mongoid. According to logs, instead of a simple _{id: ObjectId('...')}
queries we see "_id $and _id" combined queries, with the same BSON object id used in both.
According to mongo instance logs, it cause the queries to be IXSCAN as opposed to IDHACK.
Here's a gist for easy reproducing.
Thanks
Boaz
- duplicates
-
MONGOID-5204 default_scopes duplication, query scope inconsistency
- Closed