-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
While testing 4.4 shared tier cluster upgrades on Atlas, we ran into some issues with the convertLegacyIndexes that was preventing mongorestore from completing:
2020-05-08T15:03:06.079+0000 WARNING: ignoring unsupported URI parameter 'replicaset' 2020-05-08T15:03:06.313+0000 preparing collections to restore from 2020-05-08T15:03:06.334+0000 reading metadata for test.regular from archive on stdin 2020-05-08T15:03:06.351+0000 restoring test.regular from archive on stdin 2020-05-08T15:03:06.368+0000 restoring indexes for collection test.regular from metadata panic: interface conversion: interface {} is nil, not string goroutine 74 [running]: github.com/mongodb/mongo-tools/mongorestore.(*MongoRestore).convertLegacyIndexes(0xc0003f4fc0, 0xc000166370, 0x2, 0x3) /data/mci/34ceda524db18caf8d2fad96dcc1efa2/src/github.com/mongodb/mongo-tools/mongorestore/restore.go:311 +0x21a github.com/mongodb/mongo-tools/mongorestore.(*MongoRestore).RestoreIntent(0xc0003f4fc0, 0xc000178000, 0x0, 0x0, 0x0, 0x0) /data/mci/34ceda524db18caf8d2fad96dcc1efa2/src/github.com/mongodb/mongo-tools/mongorestore/restore.go:292 +0x854 github.com/mongodb/mongo-tools/mongorestore.(*MongoRestore).RestoreIntents.func1(0xc0003f4fc0, 0xc0000783c0, 0x1) /data/mci/34ceda524db18caf8d2fad96dcc1efa2/src/github.com/mongodb/mongo-tools/mongorestore/restore.go:98 +0x1cd created by github.com/mongodb/mongo-tools/mongorestore.(*MongoRestore).RestoreIntents /data/mci/34ceda524db18caf8d2fad96dcc1efa2/src/github.com/mongodb/mongo-tools/mongorestore/restore.go:81 +0x12c
The process to upgrade a shared tier involves a mongodump piped into a mongorestore.
I was able to reproduce this with a 4.4 replica set and MongoDB Database Tools v100.0.1. To setup the source collection from the shell:
use test db.regular.createIndexes([ {"a.b": 1}, {s:"text"}]);
use test for (let i = 0; i < 10; i++) { db.useSiblingDB("test").regular.insert({a: [{b:i}], s: ""+i}); }