[SERVER-62636] setFeatureCompatibilityVersion 4.4 succeeds on 5.0 binVersion that has indexes with conflicting options Created: 14/Jan/22  Updated: 29/Oct/23  Resolved: 21/Aug/22

Status: Closed
Project: Core Server
Component/s: Catalog, Replication
Affects Version/s: 5.0.0
Fix Version/s: 5.0.12

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

Issue Links:
Related
is related to SERVER-51333 setFeatureCompatibilityVersion should... Closed
is related to SERVER-25023 no way to index the same fields with ... Closed
is related to SERVER-47657 Add 'unique' and 'sparse' parameters ... Closed
is related to SERVER-47659 Add 'wildcardProjection' parameter to... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-08-08, QE 2022-08-22
Participants:

 Description   

IndexCatalogImpl::_doesSpecConflictWithExisting() throws an exception if an index with conflicting options is attempted to be created while in FCV 4.4. 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_index_option_conflict] d20021| {"t":{"$date":"2022-01-14T01:11:15.770+00:00"},"s":"E",  "c":"REPL",     "id":21416,   "ctx":"ReplCoordExtern-2","msg":"Initial sync failed, shutting down now. Restart the server to attempt a new initial sync"}
[js_test:repro_initial_sync_index_option_conflict] d20021| {"t":{"$date":"2022-01-14T01:11:15.770+00:00"},"s":"F",  "c":"-",        "id":23095,   "ctx":"ReplCoordExtern-2","msg":"Fatal assertion","attr":{"msgid":40088,"error":"InitialSyncFailure: error cloning databases :: caused by :: IndexOptionsConflict: Error cloning collection 'test.mycoll' :: caused by :: An equivalent index already exists with a different name and options. Requested index: { v: 2, unique: true, key: { x: 1.0 }, name: \"x2\" }, existing index: { v: 2, key: { x: 1.0 }, name: \"x1\", sparse: true }","file":"src/mongo/db/repl/replication_coordinator_impl.cpp","line":782}}



 Comments   
Comment by Kyle Suarez [ 14/Jan/22 ]

bernard.gorman, we discussed this in North America triage – it sounds related to some of your work and we are going to defer to you and EMEA to triage this ticket.

Comment by Kyle Suarez [ 14/Jan/22 ]

Speaking with max.hirschhorn offline, he believes that we should make setFCV() fail to downgrade FCV if there are ambiguous indexes in the last-LTS FCV.

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