[SERVER-58083] Correct the assertion that the stable timestamp is at least the all durable value Created: 25/Jun/21  Updated: 29/Oct/23  Resolved: 25/Jun/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to WT-7714 Prepared commit race with moving stab... Closed
is related to SERVER-51387 Assert that the stable timestamp is n... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-06-28
Participants:

 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)            |



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 25/Jun/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-58083 Correct the assertion that the stable timestamp is at least the all durable value
Branch: master
https://github.com/mongodb/mongo/commit/3edd1e097cf4ad48415dc0e6cf73ba0fa2022410

Generated at Thu Feb 08 05:43:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.