[SERVER-30745] Prohibit unsafe comparisons against feature compatibility version Created: 18/Aug/17  Updated: 30/Oct/23  Resolved: 18/Oct/17

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.6.0-rc0

Type: Task Priority: Major - P3
Reporter: Andy Schwerin Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-31315 expose the four distinct upgrade/down... Closed
Related
related to SERVER-31783 Secondaries may generate a UUID for a... Closed
is related to SERVER-31608 FeatureCompatibility Version enum is ... Closed
Assigned Teams:
Sharding
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-09-11, Storage 2017-10-23
Participants:

 Description   

To facilitate cleaning up dead code after splitting the master development branch from the 3.6 release branch, comparisons against serverGlobalOptions.featureCompatibility.version should be restricted to asking the question "is the current version 3.4?" By making this restriction, when we remove the constants for v3.4 in the development branch and add the v3.8 constants instead, the compiler will direct our developers to branches that are now always-taken or never-taken.

Note, this task does not include auditing comparisons against the feature compatibility version to ensure that they are race-free or otherwise correct.



 Comments   
Comment by Tess Avitabile (Inactive) [ 18/Oct/17 ]

Thanks, louis.williams, I linked SERVER-31438 as a dependency of SERVER-31608.

Comment by Louis Williams [ 18/Oct/17 ]

SERVER-31438 should also be resolved

Comment by Tess Avitabile (Inactive) [ 18/Oct/17 ]

Thanks for pointing me to SERVER-31608, esha.maharishi. It looks like judah.schvimer requested that we remove getVersion() as part of that work. I will resolve this ticket and restore the original fixVersion.

Comment by Eric Milkie [ 18/Oct/17 ]

There's already a commit in master for this ticket, so you'll have to close this and do further work on a different ticket, in order for the fixVersion field to be accurate.

Comment by Esha Maharishi (Inactive) [ 17/Oct/17 ]

tess.avitabile, that is true, the commit on this got us most of the way there, but not completely.

Re-opening this ticket with Needs Triage and linking it as related to SERVER-31608, which might take it the rest of the way.

Comment by Tess Avitabile (Inactive) [ 17/Oct/17 ]

I don't think this work is complete, since it is still possible to call getVersion(). There is still some confusion on the Server team about whether getVersion() or isFullyUpgradedTo36() should be used.

Comment by Louis Williams [ 06/Oct/17 ]

There are some non-compliant usages of featureCompatibility.getVersion(), and I have filed a separate ticket here: SERVER-31438

Comment by Githook User [ 06/Oct/17 ]

Author:

{'email': 'louis.williams@mongodb.com', 'name': 'Louis Williams', 'username': 'louiswilliams'}

Message: SERVER-30745 Prohibit unsafe comparisons against featureCompatibilityVersion
Branch: master
https://github.com/mongodb/mongo/commit/3d42a318626e059b2669356bb5d39056b8fa1b76

Comment by Andy Schwerin [ 25/Sep/17 ]

Actually, I'd stop progress on it for now. I want to wait for some other upgrade work to land, so I don't get in the way.

Comment by Gregory McKeon (Inactive) [ 25/Sep/17 ]

schwerin should this go back to in progress?

Generated at Thu Feb 08 04:24:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.