[SERVER-21527] Race between remove shard and access to database may cause NULL pointer crash Created: 18/Nov/15  Updated: 06/Dec/22  Resolved: 05/May/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.2.0-rc3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-23996 ShardRegistry::getShard should return... Closed
Related
is related to SERVER-21896 Chunk metadata will not get refreshed... Closed
Assigned Teams:
Sharding
Operating System: ALL
Sprint: Sharding C (11/20/15), Sharding D (12/11/15), Sharding E (01/08/16)
Participants:

 Description   

ShardRegistry::getShard will return nullptr if the shard id is not found. In the steady state, the metadata should never contain a database which references a removed shard, because we drain the shard first and clear the cached metadata. However, in theory, there is a very narrow race condition where a query might be referencing a database entry, which points to a shard, which was just removed.



 Comments   
Comment by Githook User [ 20/Nov/15 ]

Author:

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

Message: SERVER-21527 Cleanup usages of getShard for resolving host to shard
Branch: master
https://github.com/mongodb/mongo/commit/5b3257d526f8217e303609418da1769275f81d03

Generated at Thu Feb 08 03:57:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.