Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58083

Correct the assertion that the stable timestamp is at least the all durable value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.1.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2021-06-28

    Description

      SERVER-51387 introduced an invariant that MDB never sets a stable timestamp that is smaller than the all durable timestamp.

      However, it uses a method that subtly returns the maximum ever seen all_durable value. It would be preferable to use a raw value.

      An example of an assertion that passes when it should fail:

      | Good Writer     | Ghost Writer          | all_durable | max(all_durable) | Stable Setter                             |
      |-----------------+-----------------------+-------------+------------------+-------------------------------------------|
      | BeginTxn        |                       |             |                  |                                           |
      | SetTimestamp 10 |                       |           9 |                9 |                                           |
      |                 |                       |             |                  | Reads 9                                   |
      |                 |                       |             |                  | Asserts 9 <= max(all_durable, 9)          |
      |                 |                       |             |                  | Sets 9                                    |
      | Commit          |                       |          10 |               10 |                                           |
      |                 |                       |             |                  | Reads 10                                  |
      |                 |                       |             |                  | Asserts 10 <= max(all_durable, 10)        |
      |                 |                       |             |                  | Sets 10                                   |
      |                 | BeginTxn              |             |                  |                                           |
      |                 | Read LogicalClock(20) |             |                  |                                           |
      | BeginTxn        |                       |             |                  |                                           |
      | SetTimestamp 20 |                       |          19 |               19 |                                           |
      | Commit          |                       |             |                  |                                           |
      |                 |                       |          20 |               20 |                                           |
      |                 |                       |             |                  | Reads 20                                  |
      |                 | SetTimestamp 20       |          19 |               20 |                                           |
      |                 |                       |             |                  | Asserts 20 <= max(all_durable, 20) versus |
      |                 |                       |             |                  | Asserts 20 <= all_durable (19)            |
      

      Attachments

        Issue Links

          Activity

            People

              gregory.wlodarek@mongodb.com Gregory Wlodarek
              daniel.gottlieb@mongodb.com Daniel Gottlieb
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: