Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Labels:
      None
    • # Replies:
      6
    • Last comment by Customer:
      true

      Description

      The log_flush code is not flushing out the last buffer of records.

        Issue Links

          Activity

          Hide
          sue.loverso Sue LoVerso added a comment -

          Geert Bosch reported that inserting a value, calling log_flush with sync, abort and then rereading the value on startup was not working. I was able to reproduce the issue by modifying the ex_sync program. I understand the issue and am testing a fix.

          The problem was that the code is comparing against the previous log->alloc_lsn value that is before any currently buffered log records (i.e. we can only advance alloc_lsn when we close the buffered slot because that is the only time we know exactly how big the current slot is). Therefore, the code thought it was all up to date when it wasn't. The solution is to force out the writing of the current buffer before looking at log->alloc_lsn.

          Show
          sue.loverso Sue LoVerso added a comment - Geert Bosch reported that inserting a value, calling log_flush with sync, abort and then rereading the value on startup was not working. I was able to reproduce the issue by modifying the ex_sync program. I understand the issue and am testing a fix. The problem was that the code is comparing against the previous log->alloc_lsn value that is before any currently buffered log records (i.e. we can only advance alloc_lsn when we close the buffered slot because that is the only time we know exactly how big the current slot is). Therefore, the code thought it was all up to date when it wasn't. The solution is to force out the writing of the current buffer before looking at log->alloc_lsn .
          Hide
          sue.loverso Sue LoVerso added a comment -

          I will note that this problem only affects 3.1. The 3.0 backport is different and correct because in the old logging code alloc_lsn is updated before threads write into the slot buffers. We know the size of the buffer early on.

          Show
          sue.loverso Sue LoVerso added a comment - I will note that this problem only affects 3.1. The 3.0 backport is different and correct because in the old logging code alloc_lsn is updated before threads write into the slot buffers. We know the size of the buffer early on.
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'}

          Message: WT-2134 Force out pending log slot buffer to advance log->alloc_lsn for
          log_flush. Fix example to use the correct config signature.
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/7dbe9256f67ae9c53237fb0c4f9534ff10e4b3c1

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'} Message: WT-2134 Force out pending log slot buffer to advance log->alloc_lsn for log_flush. Fix example to use the correct config signature. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/7dbe9256f67ae9c53237fb0c4f9534ff10e4b3c1
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'}

          Message: WT-2134 New log_flush unit test.
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/38853bd6cf6e592ff760c4ebfe404226ea502ac2

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'} Message: WT-2134 New log_flush unit test. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/38853bd6cf6e592ff760c4ebfe404226ea502ac2
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'}

          Message: WT-2134 Remove redundant setting of variable.
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/1a5b8bf94a2f13d6bd4dcdef326d9177dc5f584d

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'} Message: WT-2134 Remove redundant setting of variable. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/1a5b8bf94a2f13d6bd4dcdef326d9177dc5f584d
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

          Message: Merge pull request #2215 from wiredtiger/log-flush-2134

          WT-2134 Flush all buffered log records in log_flush
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/8c223e4a83dca2e723f6d10b058ed1d6cce5b021

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Merge pull request #2215 from wiredtiger/log-flush-2134 WT-2134 Flush all buffered log records in log_flush Branch: develop https://github.com/wiredtiger/wiredtiger/commit/8c223e4a83dca2e723f6d10b058ed1d6cce5b021

            People

            • Assignee:
              sue.loverso Sue LoVerso
              Reporter:
              sue.loverso Sue LoVerso
              Participants:
              Last commenter:
              Michael Cahill
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 25 weeks, 6 days ago
                Date of 1st Reply: