-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Query Execution 2021-03-08
As a simple repro, start a mongod with SBE enabled:
./mongod --setParameter featureFlagSBE=true
Then run the following through the shell:
db.getMongo().forceReadMode("legacy"); db.c.drop(); db.createCollection("c", {capped: true, size: 1024}); db.c.insert({a: 1}); db.c.find().tailable();
This query fails spuriously with the following error during the first OP_GET_MORE operation:
MongoDB Enterprise > db.c.find().tailable(); Error: error: { "$err" : "OP_GET_MORE operations are not supported on tailable aggregations. Only clients which support the getMore command can be used on tailable aggregations.", "code" : 40548 }
The reason is that this check assumes that only aggregate cursors use the "locks internally" lock policy. This is no longer true, since find cursors using the SBE engine also use the "locks internally" lock policy.