[SERVER-23296] Recipient shard should check that the collection has not been dropped Created: 22/Mar/16  Updated: 14/Apr/16  Resolved: 23/Mar/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.3.4
Fix Version/s: 3.3.4

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 12 (04/01/16)
Participants:
Linked BF Score: 0

 Description   

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  -----



 Comments   
Comment by Githook User [ 23/Mar/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-23296 Recipient shard check for collection drop
Branch: master
https://github.com/mongodb/mongo/commit/85a3c8fc858549b03392d534e45ba59286707f8d

Comment by Githook User [ 23/Mar/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-23296 Move pending chunk management under MigrationDestinationManager

Moves the code, which manipulates the pending chunk data to reside under
the migration destination manager instead of the global sharding state and
makes it use the collection sharding state instead of the global map.
Branch: master
https://github.com/mongodb/mongo/commit/d9a1dd9dbd4349b18151a3223a718cf1642cd5b6

Generated at Thu Feb 08 04:02:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.