Disallow inserting a key at minDiskLoc or maxDiskLoc

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.7.6
    • Component/s: Storage
    • Storage Execution
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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() ) );
      }
      
      

            Assignee:
            [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: