[SERVER-51333] setFeatureCompatibilityVersion should fail when downgrading from FCV 4.4 to FCV 4.2 with long collection names present Created: 02/Oct/20  Updated: 29/Oct/23  Resolved: 14/Dec/20

Status: Closed
Project: Core Server
Component/s: Catalog, Replication
Affects Version/s: None
Fix Version/s: 4.4.3

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

Issue Links:
Depends
Documented
is documented by DOCS-14047 Investigate changes in SERVER-51333: ... Closed
Problem/Incident
Related
related to SERVER-51334 Primary must only permit creating tem... Closed
related to SERVER-62636 setFeatureCompatibilityVersion 4.4 su... Closed
related to SERVER-53359 jstestfuzz (mutational) fuzzer is for... Closed
related to SERVER-56961 [v4.4] Ensure cluster is in FCV 4.4 w... Closed
related to SERVER-57557 [v4.4] Support running checkFCV() she... Closed
is related to SERVER-48621 [v4.4] userAllowedCreateNS() does not... Closed
is related to SERVER-41745 Collections with names longer than 12... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Sprint: Execution Team 2020-11-02, Execution Team 2020-12-14, Execution Team 2020-12-28
Participants:
Linked BF Score: 38

 Description   

DatabaseImpl::_checkCanCreateCollection() throws an exception if a collection with a name longer than 120 characters is attempted to be created while in FCV 4.2. However, a node undergoing initial sync will also call that function and (depending on whether the admin.system.version collection has already been cloned) would fail its initial sync attempt and eventually exhaust its retries.

[js_test:repro_initial_sync_long_collection_name] 2020-10-02T18:19:19.708+0000 d20021| {"t":{"$date":"2020-10-02T18:19:19.708+00:00"},"s":"E",  "c":"REPL",     "id":21416,   "ctx":"ReplCoordExtern-0","msg":"Initial sync failed, shutting down now. Restart the server to attempt a new initial sync"}
[js_test:repro_initial_sync_long_collection_name] 2020-10-02T18:19:19.708+0000 d20021| {"t":{"$date":"2020-10-02T18:19:19.708+00:00"},"s":"F",  "c":"-",        "id":23095,   "ctx":"ReplCoordExtern-0","msg":"Fatal assertion","attr":{"msgid":40088,"error":"InitialSyncFailure: error cloning databases :: caused by :: IncompatibleServerVersion: Error cloning collection 'test.long_collection_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' :: caused by :: Fully qualified namespace is too long for FCV 4.2. Upgrade to FCV 4.4 to create this namespace. Namespace: test.long_collection_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FCV 4.2 Limit: 120","file":"src/mongo/db/repl/replication_coordinator_impl.cpp","line":754}}



 Comments   
Comment by Githook User [ 14/Dec/20 ]

Author:

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

Message: SERVER-51333 Skip setFeatureCompatibilityVersion in validation hook when long collection names are present
Branch: v4.4
https://github.com/mongodb/mongo/commit/9e445b94436ee8bb9719d84ce0365eb13d49ef95

Comment by Githook User [ 14/Dec/20 ]

Author:

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

Message: SERVER-51333 setFeatureCompatibilityVersion fails when downgrading from FCV 4.4 to FCV 4.2 with long collection names present
Branch: v4.4
https://github.com/mongodb/mongo/commit/b45c07c6174d3ac6c100453ab6d56ab7ee5dedb6

Comment by Githook User [ 10/Dec/20 ]

Author:

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

Message: Revert "SERVER-51333 setFeatureCompatibilityVersion fails when downgrading from FCV 4.4 to FCV 4.2 with long collection names present"

This reverts commit d1f0d546f21ff900d3a0b083006bf6a4b61657a8.
Branch: v4.4
https://github.com/mongodb/mongo/commit/356ad03a6d3a05daa96122c7c39bf7f87f826cb6

Comment by Githook User [ 10/Dec/20 ]

Author:

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

Message: SERVER-51333 setFeatureCompatibilityVersion fails when downgrading from FCV 4.4 to FCV 4.2 with long collection names present
Branch: v4.4
https://github.com/mongodb/mongo/commit/d1f0d546f21ff900d3a0b083006bf6a4b61657a8

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