-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.0.8
-
Component/s: Querying
-
Query Execution
The OplogStart query execution stage was built as an MMAPv1-specific mechanism for quickly finding the start point for oplog scans. It is used for tailable oplog scans as well as for opening change streams. Since MMAPv1 storage engine support was removed during 4.1 development, the OplogStart code was also removed. Therefore, this issue only affects 4.0 and earlier branches.
The OplogStart code path has a flaw in which it swallows the error returned by the PlanExecutor and instead returns an InternalError with message "quick oplog start location had error...?":
Instead, this code path should propagate the error message and error code from the underlying PlanExecutor. It should also add additional context to the error message string in order to indicate that the error occurred while using OplogStart to find the starting point for an oplog scan.
Note that it is possible for this InternalError to leak to the client on systems configured to use storage engines other than MMAPv1, in particular systems using the WiredTiger storage engine. This is because we fall back to using the OplogStart stage when RecordStore::oplogStartHack() returns boost::none. The fact that we ever use the OplogStart stage on non-MMAPv1 systems is possibly undesirable, so we may wish to correct this behavior separately.