[SERVER-47425] When 4.2 discovers log version 4 records on startup, continue to write log version 4 records Created: 08/Apr/20  Updated: 29/Oct/23  Resolved: 17/Apr/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 4.2.6, 4.4.0
Fix Version/s: 4.2.6, 4.4.0-rc2

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

Issue Links:
Depends
depends on SERVER-47538 `runMongoProgram` should omit auth op... Closed
Related
related to WT-6011 Bump the compatibility version for Mo... Closed
is related to SERVER-47344 agg_merge_upsert_supplied_cluster.js ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-04-20
Participants:

 Description   

Downgrading from 4.4 -> 4.2.6 -> 4.2.x (x < 6) is not allowed. The current state of 4.2.6 will always write out log version 3 which earlier 4.2 versions understand. However, earlier 4.2 versions will fail to startup on the checkpointed data files in a messy way (likely a seg fault)

Instead, 4.2.6 could discover if it's reading log version 4 records at startup (which is only possible via a 4.4 downgrade) and choose to write out log version 4 records. This would result in earlier versions failing with an "incompatible log version" error.



 Comments   
Comment by Githook User [ 17/Apr/20 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-47425: Add multiversion test for 4.2classic, 4.2.6+ and 4.4 behaviors.
Branch: v4.4
https://github.com/mongodb/mongo/commit/ba6cbcc3b17dfa9ab83722f7505e0bcdc3a4efe2

Comment by Daniel Gottlieb (Inactive) [ 10/Apr/20 ]

Re-opening as there's still a 4.4 test to add which requires the updated 4.2 to test in evergreen.

Comment by Githook User [ 10/Apr/20 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-47425: 4.2 binaries starting up on WT log version 4 should continue to write log version 4.

In the upgrade/downgrade lifetime of a MongoDB dbpath, WT log version 4 is first
introduced when a 4.4 binary downgrades in FCV 4.2. Once a dbpath is touched by
a 4.4 binary, the datafiles left behind cannot ever be interpreted by a binary
version earlier than 4.2.6+.

In this patch, 4.2.6+ will discover whether it's starting up on log version 3
(left behind by 4.0 and 4.2.5-) or log version 4. When starting up on log
version 3, it will continue to write log version 3. When starting up on log
version 4, it will continue to write log version 4. There will no longer be
a path to writing log version 3 without performing a resync.
Branch: v4.2
https://github.com/mongodb/mongo/commit/77036e27c1343fde8cabd5285acbf09b0c69b69e

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