Test format replay_prepare_ts sets wrong prepared timestmap

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Engines, Storage Engines - Foundations
    • SE Foundations - Q3+ Backlog
    • None

      In replay_prepare_ts function in test format,

      else {
              /*
               * Our lane's current operation will have a commit timestamp tinfo->replay_ts. Our lane's
               * previous commit timestamp was that number minus LANE_COUNT. The global stable timestamp
               * generally should not be advanced past our lane's previous commit timestamp. So a prepare
               * timestamp halfway between the lane's previous commit timestamp and the current commit
               * timestamp should be valid.
               */
              ts = tinfo->replay_ts - LANE_COUNT / 2;
      
              /* As a sanity check, make sure the timestamp hasn't completely aged out. */
              if (ts < g.oldest_timestamp)
                  prepare_ts = ts;
              else
                  prepare_ts = tinfo->replay_ts;
          }
          return (prepare_ts);
      

      We set the prepared timestamp to be older than the global oldest timestamp, which is wrong.

      Prepared timestamp cannot be older than the current global timestamp. I think it should be changed to:

              if (ts > g.stable_timestamp)
                  prepare_ts = ts;
              else
                  prepare_ts = tinfo->replay_ts;
      

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: