diff options
author | Andy Schwerin <schwerin@10gen.com> | 2013-10-05 20:54:59 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2013-10-05 20:54:59 -0400 |
commit | 8aaf9fa86aeaeeeede230d8d80a20b22c97745ac (patch) | |
tree | c835a500b2f3265c981b24064a3fcf3e5cbabc65 /jstests/disk | |
parent | 1f5a1ba9f0b73bd1594959bacc03e4fbc1feccaf (diff) | |
download | mongo-8aaf9fa86aeaeeeede230d8d80a20b22c97745ac.tar.gz |
SERVER-11051 Ignore non-existent databases reported by listDatabases in disk/newcollection.js.
Diffstat (limited to 'jstests/disk')
-rw-r--r-- | jstests/disk/newcollection.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/jstests/disk/newcollection.js b/jstests/disk/newcollection.js index f2de651e775..71a17373ae0 100644 --- a/jstests/disk/newcollection.js +++ b/jstests/disk/newcollection.js @@ -10,8 +10,13 @@ var t = db[baseName]; var getTotalNonLocalSize = function() { var totalNonLocalDBSize = 0; m.getDBs().databases.forEach( function(dbStats) { - if (dbStats.name != "local") - totalNonLocalDBSize += dbStats.sizeOnDisk; + // We accept the local database's space overhead. + if (dbStats.name == "local") return; + + // Databases with "sizeOnDisk=1" and "empty=true" dont' actually take up space o disk. + // See SERVER-11051. + if (dbStats.sizeOnDisk == 1 && dbStats.empty) return; + totalNonLocalDBSize += dbStats.sizeOnDisk; }); return totalNonLocalDBSize; } |