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

Some additional buffer management cleanup.

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.2
    • Component/s: None
    • Labels:

      Description

      @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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              keith.bostic Keith Bostic
              Reporter:
              keith.bostic Keith Bostic
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: