[SERVER-45642] A syncdelay value of 0 causes the WiredTigerCheckpointThread to run as often as possible Created: 17/Jan/20  Updated: 29/Oct/23  Resolved: 02/Jun/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.4.0-rc9, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Justin Seyster Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-48540 Shell MongoRunner.arrOptions should n... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-06-01, Execution Team 2020-06-15
Participants:

 Description   

The help text for the --syncdelay command line argument (which populates wiredTigerGlobalOptions.checkpointDelaySecs) indicates that a value of 0 will stop the checkpoint thread from running at all.

In the actual thread, though, it gets interpreted as a delay of 0, causing it to loop as fast as it can:
https://github.com/mongodb/mongo/blob/b758eb90dd982460af62fbb61737f935dae9b828/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L379-L381



 Comments   
Comment by Githook User [ 05/Jun/20 ]

Author:

{'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com', 'username': 'DiannaHohensee'}

Message: SERVER-45642 Fix WiredTigerCheckpointThread to skip checkpointing if syncdelay is set to 0; disallow users from setting syncdelay values greater than an hour; and stop spurious checkpoint thread wakeups.

Also move JS tests using high syncdelay values to using the now working 0 value to disable checkpointing.

(cherry picked from commit 8ee572abe5a47d3d49e7436c1a376ac395517add)
Branch: v4.4
https://github.com/mongodb/mongo/commit/fd2410489eab2186e45c1706bbefb37084b782c4

Comment by Githook User [ 02/Jun/20 ]

Author:

{'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com', 'username': 'DiannaHohensee'}

Message: SERVER-45642 Fix WiredTigerCheckpointThread to skip checkpointing if syncdelay is set to 0; disallow users from setting syncdelay values greater than an hour; and stop spurious checkpoint thread wakeups.

Also move JS tests using high syncdelay values to using the now working 0 value to disable checkpointing.
Branch: master
https://github.com/mongodb/mongo/commit/8ee572abe5a47d3d49e7436c1a376ac395517add

Comment by Connie Chen [ 23/Jan/20 ]

We should make 0 disable checkpointing work for testing, but take out the documentation that mentions 0 sync delay . Also make sure the max value is reasonable for sync-delay

Comment by Justin Seyster [ 21/Jan/20 ]

One option for testing would be to set the syncdelay to a very high value (higher than the timeout for any of the tests).

Comment by David Daly [ 21/Jan/20 ]

I'm fine with changing documentation to reflect reality. If we do that can we add a knob that does what we originally expected for internal testing purposes?

Comment by Alexander Gorrod [ 19/Jan/20 ]

Given that the behavior of disabling checkpoint has been broken since the first 3.6 release, I think we should consider changing the documentation to match current behavior. Disabling checkpoints has fairly far-reaching and sometimes surprising consequences, like:

  • Stopping WiredTiger from being able to clean up old journal (log) files
  • meaning that recovery after a crash can take a very very long time and
  • meaning that backups won't work or will take an unacceptably long time to bring back online.
Generated at Thu Feb 08 05:09:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.