[SERVER-50915] [v4.0] fsyncLock must not take a stable checkpoint when majority read concern is off Created: 14/Sep/20  Updated: 29/Oct/23  Resolved: 21/Sep/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 4.0.20
Fix Version/s: 4.0.21

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

Issue Links:
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-10-05
Participants:
Case:

 Description   

When majority read concern is off, we take unstable checkpoints ("use_timestamp=false") in the checkpoint thread. This prevents the checkpoint_timestamp entry from appearing in the WiredTiger.backup file to properly restore a WiredTiger backup taken via filesystem copies.

However, when the fsyncLock command is run, it takes a checkpoint after locking the instance. A checkpoint is taken with "use_timestamp=true", which is a stable checkpoint and includes the checkpoint_timestamp entry in the WiredTiger.backup file. This is not the desired behaviour and overwrites the correct setting chosen earlier by the checkpointing thread.

 

fsyncLock calls WiredTigerKVEngine::flushAllFiles with stableCheckpoint = true. When stableCheckpoint is true, we take a stable checkpoint. This needs to be changed to take an unstable checkpoint when majority read concern is off.

 

This problem went away in v4.2 and later versions from the work done in SERVER-37897.



 Comments   
Comment by Githook User [ 21/Sep/20 ]

Author:

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

Message: SERVER-50915 fsyncLock must not take a stable checkpoint when majority read concern is off
Branch: v4.0
https://github.com/mongodb/mongo/commit/b1d4d55ec0af8a7b2f5cbefdb8dd590607dfe732

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