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

Fix RTS to skip tables with no time window information in the checkpoint

    • 3
    • 2023-05-16 Chook-n-Nuts Farm
    • v7.0, v6.0, v5.0, v4.4

      With the support of durable history in WiredTiger from MongoDB version 4.4, Rollback to stable runs as part of the recovery to ensure the correctness of the database.

      Rollback stable runs on a table in the following conditions.

      1. The dhandle is present in the cache and tree is modified.
      2. The checkpoint durable start/stop timestamp is greater than the stable timestamp.
      3. The checkpoint has prepared updates written to disk.
      4. There is no durable timestamp in any checkpoint.
      5. The checkpoint newest txn is greater than checkpoint snapshot min txn id.

      The condition of no durable timestamp in the checkpoint is possible only when the table is checkpointed with versions prior to the durable history like version 4.2 or before.
      From version 4.4 onwards, any table that gets checkpointed will write the time window information in the checkpoint even if the time window is empty.

      Versions 4.2 and prior don't write any unstable data to the table, but these tables are opened and validated to ensure that no unstable data exists in the table. This check is unnecessary and it is causing problems to the database that are having a lot of tables when they upgrade from version 4.2 to 4.4 or later.

      The solution to avoid this problem is to skip the tables that do not have any time window information in the checkpoint. This approach doesn't cause any problems for the non-timestamp tables, because the time window information is written irrespective of whether it is a timestamp or non-timestamp table.

            Assignee:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Reporter:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: