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

Fix test and docs for correct log cursor usage

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT3.2.0, 4.1.11
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 3
    • Storage Engines 2019-04-22, Storage Engines 2019-05-06

      When a log cursor returns a record that does not have a natural key and value, the intent is to return an empty key and fill the value with the current log record contents.  In fact, an empty key and a value representing the next (not current) log record is returned. This is not typically visible because wt printlog doesn't print the returned key and value for operations like file_sync.

      This was found while debugging the test suite for Python3.  The test_alter02.py program could detect the problem, but it has an error (fixed as part of the Python3 work) that prevented this.

      To reproduce, apply the attached patch to test_alter02.py.  The test inserts a unique cookie into a table N times, and walks the log file, looking for N occurrences. When running, you see that there are 2*N matches, because the value for the record before the commit record contains the cookie. In this case, the record that is incorrect is file_sync. Compare the records printed with the wt printlog output.

            Assignee:
            sue.loverso@mongodb.com Susan LoVerso
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: