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

__rec_split size calculation off

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

      I believe the size calculation in __rec_split is wrong if multiple splits fit onto a single page.

      The code currently does:

      if (inuse + r->split_size <= r->page_size)
                 r->space_avail = r->split_size - WT_PAGE_HEADER_BYTE_SIZE(btree);
      

      In this case we are attempting to fit all of the items on a single page - if we do that we only have a single page header written. The calculation should be:

      ->space_avail = r->split_size

      . I believe that the code in

      Unable to find source-code formatter for language: __rec_split_fixup. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      
      

      already deals with creating the page header from the boundary structure in the case where all of the content doesn't fit onto a single page.

            Assignee:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: