Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-17314

WiredTigerRecordStore::insertRecord doesn't need to use shared_array

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.1.6
    • Affects Version/s: 3.0.0-rc8
    • Component/s: WiredTiger
    • Fully Compatible
    • ALL
    • Quint Iteration 6

      buf isn't shared so scoped_array can be used in place of shared_array and avoid the overhead from reference counting.

      StatusWith<RecordId>
      WiredTigerRecordStore::insertRecord( OperationContext* txn,
      const DocWriter* doc,
      bool enforceQuota )

      { const int len = doc->documentSize(); boost::shared_array<char> buf( new char[len] ); doc->writeDocument( buf.get() ); return insertRecord( txn, buf.get(), len, enforceQuota ); }

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            mdcallag Mark Callaghan
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: