The migration destination manager checks whether the collection metadata version has the expected value at the end of the migration cycle. This check happens by querying the collection's cached metadata.
If a database gets dropped while migration is happening though, the collection metadata will be null and the check crashes with null pointer exception:
[js_test:zbigMapReduce] 2016-03-21T19:17:53.059+0000 d20762| ----- BEGIN BACKTRACE ----- [js_test:zbigMapReduce] 2016-03-21T19:17:53.063+0000 d20762| {"backtrace":[{"b":"400000","o":"F37A72","s":"_ZN5mongo15printStackTraceERSo"},{"b":"400000","o":"F36979"},{"b":"400000","o":"F36CF8"},{"b":"400000","o":"10E9493"},{"b":"2AAD08346000","o":"ECA0"},{"b":"400000","o":"BC58BB","s":"_ZN5mongo13ShardingState13forgetPendingEPNS_16OperationContextERKSsRKNS_7BSONObjES7_RKNS_3OIDEPSs"},{"b":"400000","o":"BA9EDC","s":"_ZN5mongo27MigrationDestinationManager14_migrateThreadESsNS_18MigrationSessionIdENS_7BSONObjES2_S2_SsNS_3OIDENS_19WriteConcernOptionsE"},{"b":"400000","o":"BAA361"},{"b":"400000","o":"194ED60"},{"b":"2AAD08346000","o":"683D"},{"b":"2AAD08563000","o":"D4FDD","s":"clone"}],"processInfo":{ "mongodbVersion" : "3.3.3-77-g8724837", "gitVersion" : "8724837bfe66e20c5ea65fc43457896e9dfc6a8a", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "2.6.18-194.el5xen", "version" : "#1 SMP Tue Mar 16 22:01:26 EDT 2010", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000" }, { "b" : "2AAD077A7000", "path" : "/lib64/librt.so.1", "elfType" : 3 }, { "b" : "2AAD079B0000", "path" : "/lib64/libdl.so.2", "elfType" : 3 }, { "b" : "2AAD07BB4000", "path" : "/usr/lib64/libstdc++.so.6", "elfType" : 3 }, { "b" : "2AAD07EB5000", "path" : "/lib64/libm.so.6", "elfType" : 3 }, { "b" : "2AAD08138000", "path" : "/lib64/libgcc_s.so.1", "elfType" : 3 }, { "b" : "2AAD08346000", "path" : "/lib64/libpthread.so.0", "elfType" : 3 }, { "b" : "2AAD08563000", "path" : "/lib64/libc.so.6", "elfType" : 3 }, { "b" : "2AAD07589000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3 } ] }} [js_test:zbigMapReduce] 2016-03-21T19:17:53.063+0000 d20762| mongod(_ZN5mongo15printStackTraceERSo+0x32) [0x1337a72] [js_test:zbigMapReduce] 2016-03-21T19:17:53.063+0000 d20762| mongod(+0xF36979) [0x1336979] [js_test:zbigMapReduce] 2016-03-21T19:17:53.064+0000 d20762| mongod(+0xF36CF8) [0x1336cf8] [js_test:zbigMapReduce] 2016-03-21T19:17:53.064+0000 d20762| mongod(+0x10E9493) [0x14e9493] [js_test:zbigMapReduce] 2016-03-21T19:17:53.064+0000 d20762| libpthread.so.0(+0xECA0) [0x2aad08354ca0] [js_test:zbigMapReduce] 2016-03-21T19:17:53.064+0000 d20762| mongod(_ZN5mongo13ShardingState13forgetPendingEPNS_16OperationContextERKSsRKNS_7BSONObjES7_RKNS_3OIDEPSs+0xCB) [0xfc58bb] [js_test:zbigMapReduce] 2016-03-21T19:17:53.065+0000 d20762| mongod(_ZN5mongo27MigrationDestinationManager14_migrateThreadESsNS_18MigrationSessionIdENS_7BSONObjES2_S2_SsNS_3OIDENS_19WriteConcernOptionsE+0x17C) [0xfa9edc] [js_test:zbigMapReduce] 2016-03-21T19:17:53.065+0000 d20762| mongod(+0xBAA361) [0xfaa361] [js_test:zbigMapReduce] 2016-03-21T19:17:53.065+0000 d20762| mongod(+0x194ED60) [0x1d4ed60] [js_test:zbigMapReduce] 2016-03-21T19:17:53.066+0000 d20762| libpthread.so.0(+0x683D) [0x2aad0834c83d] [js_test:zbigMapReduce] 2016-03-21T19:17:53.066+0000 d20762| libc.so.6(clone+0x6D) [0x2aad08637fdd] [js_test:zbigMapReduce] 2016-03-21T19:17:53.066+0000 d20762| ----- END BACKTRACE -----