-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Minor Change
-
ALL
-
Repl 2021-01-25
-
(copied to CRM)
-
14
My change to the "listIndexes" IDL (SERVER-52545) has caused an intermittent failure in jstestfuzz_replication_initsync, I think this is the sequence:
- the fuzzer generates a createIndexes command like {createIndexes: [ {key: "foo", dropDups: "some string"}]}
- that's wrong because "dropDups" is supposed to be a bool, but createIndexes succeeds anyway (its parameter validation is spotty, awaiting
SERVER-52539) and creates a corrupt catalog entry - subsequent "listIndexes" commands fail with a uassert, because they now strictly parse the catalog entries. The message is like: "Could not parse catalog entry while replying to listIndexes"
- initial sync is now impossible because the sync source can't answer "listIndexes". The initial-sync node crashes, logging:
> "Fatal assertion","attr":{"msgid":40088,"error":"InitialSyncFailure: error cloning databases :: caused by :: Location5254501: Error cloning collection 'qa450.existingname' :: caused by :: listIndexes failed: { ok: 0.0, errmsg: \"Could not parse catalog entry while replying to listIndexes\", code: 5254501, codeName: \"Location5254501\",
This may be fixed by
SERVER-52539"Specify input/output to createIndexes command in IDL", which will make createIndexes as strict as listIndexes. But I want to fix the BF sooner than that, so this ticket is a bandaid. Besides, there may be value to validating index options at several levels, that'll be more clear onceSERVER-52539is done.
(In retrospect, we should've converted createIndexes before listIndexes, but I didn't anticipate this issue.)
I made createIndexes validate the "background" option in this commit, now I'll validate the rest of the options.
- is caused by
-
SERVER-52545 Specify input/output to listIndexes command in IDL
- Closed
- is duplicated by
-
SERVER-49224 Improve validation of index spec fields
- Closed
- is related to
-
SERVER-26287 createIndexes should confirm that index options are valid in respect to the underlying collection
- Closed
- related to
-
SERVER-52539 Specify input/output to createIndexes command in IDL
- Closed
-
SERVER-53765 Validate index entries at catalog layer
- Backlog