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

History Store truncates when stable timestamp is not set

      When running some of the python tests, (test_hs09, test_hs11, test_hs14), the stable timestamp is not set at all during the tests, and thus causes the history store file to be truncated.

      I don't think this is a valid case for MongoDB usage.

      Rollback-to-stable skips a collection with timestamped updates, when stable timestamp is either zero or not set. The sweep phase of rollback-to-stable scans the whole of history store for any timestamped updates which are not stable i.e. versions greater than the stable timestamp and discards them. This results in truncating whole of history store in cases when stable timestamp is not set. 

      The sweep phase of rollback-to-stable executes only during the shutdown, not during recovery.  

      This ticket is created to discuss this behaviour and to finalise the expected behaviour. 

      Steps to reproduce:

      1. Run the attached test.
      2. Dump the history store. --> can see some entries in history store.
      3. Again Dump the history store. --> No entries in history store at this point.

      Truncating of the history store happens when shutdown happens as part of the Dump in Step 2.

        1. data_file.png
          data_file.png
          696 kB
        2. hs_file.png
          hs_file.png
          1.21 MB
        3. test_hs99.py
          3 kB

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: