[SERVER-48445] Inconsistency in usage of programMajorMinorVersion when appending jsTestOptions Created: 27/May/20  Updated: 29/Oct/23  Resolved: 10/Jul/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Jason Chan Assignee: Xuerui Fa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-49407 Add oplogApplicationEnforcesSteadySta... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2020-07-27
Participants:

 Description   

Currently, we parse the programMajorMinorVersion like so in servers.js.
An example would be that for a binary like 'mongo-4.4', we end up parsing programMajorMinorVersion to be '404'.

There are currently usages of the variable that expect a different parsing convention. For instance, this line here expects a binary like 'mongo-4.3' to have programMajorMinorVersion = '430'. This becomes a problem for our multiversion tests since this means we aren't getting the test coverage that we expect.

Another example of an incorrect usage can be found here.

It seems a little unintuitive that we parse the programMajorMinorVersion to be '404' rather than '440'. Maybe we should consider updating programMajorMinorVersion to be the following:

programMajorMinorVersion = parseInt(major) * 100 + parseInt(minor) * 10;

At the very least, we should fix the conditionals that are checking for programMajorMinorVersion incorrectly to get the intended test coverage in our multiversion tests.



 Comments   
Comment by Githook User [ 10/Jul/20 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: SERVER-48445: Fix inconsistency in usage of programMajorMinorVersion when appending jsTestOptions
Branch: master
https://github.com/mongodb/mongo/commit/86583283accf80942b1586dce92de533dcff3e44

Comment by Brooke Miller [ 08/Jun/20 ]

Assigned to Replication since they will design the syntax for mongodb versions post-4.4.

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