Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-977

Some additional buffer management cleanup.

    • Type: Icon: Task Task
    • Resolution: Done
    • WT2.2
    • Affects Version/s: None
    • Component/s: None

      @michaelcahill, this is the rest of the change for WT-971.

      There are two changes here:

      1. Instead of explicitly checking if we're looking at non-local data before growing the buffer, I've changed the buffer grow function to copy non-local data into place. This feels cleaner to me, if you're growing a buffer, and you currently point to non-local data, it seems intuitive that you'd want the original data and growth to happen in a local buffer.

      This slightly complicates the buffer grow front-end, it has to check both the size and if the data is non-local to the buffer.

      I've updated the three cases in the code where we care about this, the special-case code just goes away.

      2. I set WT_ITEM.size to 0 in the buffer initialization routines, before calling the buffer grow function; I doubt it's necessary, but it seems safer to me.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: