[SERVER-13212] ListDatabases implementation can cause dropped dbs to reappear Created: 14/Mar/14  Updated: 06/Dec/22  Resolved: 08/Mar/17

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Backlog - Storage Execution Team
Resolution: Duplicate Votes: 2
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-20638 Reading the profiling level shouldn't... Closed
Related
is related to SERVER-2080 Connecting to an authenticated server... Closed
Assigned Teams:
Storage Execution
Operating System: ALL
Participants:
Linked BF Score: 0

 Description   

It locks databases just to check if they are empty (where empty is defined as not having an NS file). This is unnecessary since it computes the size just before grabbing the lock. Additionally, if a DB is dropped after we get the list of dbs, but before we lock that database, the DB will be artificially resurrected.

The second loop uses the hard coded size of 1 which seems incorrect since it is almost exclusively for dbs that are "empty".



 Comments   
Comment by Eric Milkie [ 08/Mar/17 ]

Shane is right; fixed as part of the rewrite in SERVER-20638

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