-
Type: Investigation
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 100.5.0
-
Component/s: mongodump, mongorestore
-
Environment:Production
Problem Statement/Rationale
Since I upgraded from 4.2 to 4.4, mongorestore has weird behaviour, index restore is working for some collections at the same time not working for others
Steps to Reproduce
- Upgrade 4.2 to 4.4
- Take backup using mongodump
- Now restore backup
- On some collections, I am getting following {{
{"alternate":"non-ignorable", "backwards":false, "caseFirst":"off", "caseLevel":false, "locale":"en_US", "maxVariable":"punct", "normalization":false, "numericOrdering":false, "strength":3, "version":"57.1"}
}}. It seems whenever I get this, indexes don't get restored. And it's not showing any understandable error.
Expected Results
All indexes for all collections must be restored correctly
Actual Results
For some collections, indexes are being restored correctly and at the same time not working for other collections in the same database. And I am seeing some weird logs in the index restore process which I never saw in the restore process in any older versions. Logs are given in additional notes.
Additional Notes
When I get this indexes don't get restored, but I am not getting any meaningful errors
2021-09-19T09:03:58.931-0500 restoring indexes for collection reflecx_io_old.voc_20201021 from metadata
2021-09-19T09:03:58.931-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"language.code", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.931-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"survey_response.question.comment_type", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"text_analytics.response.sentiment_label", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"text_analytics.response.categorization.sentiment_id", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M{"collation":primitive.M
, "name":"reporting.dealer.type_1", "ns":"reflecx_io.voc_20201021", "v":2}, Key:primitive.D{primitive.E{Key:"reporting.dealer.type", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"client_id", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"survey_response.response_id", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"survey_response.question.q_code", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"survey_response.question.o_code", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M{"collation":primitive.M
, "name":"survey_response.question.comment_1", "ns":"reflecx_io.voc_20201021", "v":2}, Key:primitive.D{primitive.E{Key:"survey_response.question.comment", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"text_analytics.response.sentiment_id", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:58.932-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"text_analytics.response.categorization.sentiment_label", Value:1}}, PartialFilterExpression:primitive.D(nil)}
For some collections, I get below and indexes restore correctly
2021-09-19T09:03:59.177-0500 restoring indexes for collection reflecx_io_old.org from metadata
2021-09-19T09:03:59.177-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"name", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:59.177-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"parent", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:59.177-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"level", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:59.177-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"identifier", Value:1}}, PartialFilterExpression:primitive.D(nil)}
2021-09-19T09:03:59.177-0500 index: &idx.IndexDocument{Options:primitive.M
, Key:primitive.D{primitive.E{Key:"client_id", Value:1}}, PartialFilterExpression:primitive.D(nil)}