[SERVER-15649] initial diskloc search in migration doesn't register an auto-yield index cursor Created: 14/Oct/14  Updated: 10/Dec/14  Resolved: 07/Nov/14

Status: Closed
Project: Core Server
Component/s: Querying, Sharding
Affects Version/s: 2.6.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-15650 Check for places where YIELD_AUTO cou... Closed
Operating System: ALL
Participants:

 Description   

When iterating disklocs for the initial data transfer of a migration, the index cursor is set to auto-yielding behavior, but is not registered for data notifications. This may lead to the index iterator crashing (though no migration actions are taken at this point, so the migration itself simply fails).

v2.6 only.



 Comments   
Comment by David Storch [ 07/Nov/14 ]

After reviewing the code more closely, I don't think there is a bug. The migration code in question uses an instance of InternalRunner, and then calls runner->setYieldPolicy(Runner::YIELD_AUTO). The InternalRunner's implementation of setYieldPolicy() internally registers the runner to receive invalidation/kill notifications:

https://github.com/mongodb/mongo/blob/r2.6.5/src/mongo/db/query/internal_runner.cpp#L86-L89

It then deregisters the runner on destruction. Closing this ticket as "Works as Designed".

Generated at Thu Feb 08 03:38:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.