[SERVER-15412] Disallow inserting a key at minDiskLoc or maxDiskLoc Created: 26/Sep/14  Updated: 06/Dec/22  Resolved: 01/Apr/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.7.6
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Participants:

 Description   

SortedDataInterface::insert should return an error status (ErrorCodes::InternalError?) if try to insert a key at minDiskLoc or maxDiskLoc.

 
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() );
 
{
    scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
    ASSERT( sorted->isEmpty( opCtx.get() ) );
}
 
{
    scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
    {
        WriteUnitOfWork uow( opCtx.get() );
        ASSERT_NOT_OK( sorted->insert( opCtx.get(), key1, minDiskLoc, false ) );
        ASSERT_NOT_OK( sorted->insert( opCtx.get(), key1, minDiskLoc, true ) );
        uow.commit();
    }
}
 
{
    scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() );
    ASSERT( sorted->isEmpty( opCtx.get() ) );
}
 


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