Description
Relevant snippet of test case extracted below:
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
|
scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() );
|
|
|
scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
|
|
|
WriteUnitOfWork uow( opCtx.get() );
|
sorted->insert( opCtx.get(), key1, loc1, false );
|
uow.commit();
|
|
|
scoped_ptr<SortedDataInterface::Cursor> cursor( sorted->newCursor( opCtx.get(), 1 ) );
|
cursor->locate( key1, loc1 );
|
|
|
vector<const BSONElement*> keyEnd( 1 );
|
vector<bool> keyEndInclusive( 1 );
|
|
|
cursor->advanceTo( key1, 1, false, keyEnd, keyEndInclusive );
|
The hang only occurs when advanceTo() is called on the key where the cursor is currently positioned, and that is the last entry in the index. For example, calling cursor->advanceTo(key2, 1, false, keyEnd, keyEndInclusive) instead positions the cursor correctly at EOF.
Attachments
Issue Links
- is related to
-
SERVER-17635 Improve SortedDataInterface::Cursor API
-
- Closed
-