[SERVER-15549] listDatabases size information should come from the storage engine Created: 07/Oct/14  Updated: 11/Jul/16  Resolved: 30/Oct/14

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 2.7.8

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

Operating System: ALL
Participants:

 Description   

The listDatabases functionality currently assumes directory structure based on what MMAP V1 is using in order to calculate sizes. This needs to be pushed inside the storage engine.

The failing repl7.js test demonstrates this:

m31001| 2014-10-07T04:15:58.950+0000 F -        [conn1] Invalid access at address: 0x8
 m31001| 2014-10-07T04:15:58.956+0000 F -        [conn1] Got signal: 11 (Segmentation fault).
 m31001| 
 m31001|  0xf0c959 0xf0c512 0xf0c83e 0x7f1273f72340 0x903ca0 0x955a54 0x9b5d64 0x9b6c24 0x9b76b1 0xbaa287 0xa8d004 0x7f30f0 0xebff01 0x7f1273f6a182 0x7f1272a32fbd
 m31001| ----- BEGIN BACKTRACE -----
 m31001| {"backtrace":[{"b":"400000","o":"B0C959"},{"b":"400000","o":"B0C512"},{"b":"400000","o":"B0C83E"},{"b":"7F1273F62000","o":"10340"},{"b":"400000","o":"503CA0"},{"b":"400000","o":"555A54"},{"b":"400000","o":"5B5D64"},{"b":"400000","o":"5B6C24"},{"b":"400000","o":"5B76B1"},{"b":"400000","o":"7AA287"},{"b":"400000","o":"68D004"},{"b":"400000","o":"3F30F0"},{"b":"400000","o":"ABFF01"},{"b":"7F1273F62000","o":"8182"},{"b":"7F1272938000","o":"FAFBD"}],"processInfo":{ "mongodbVersion" : "2.7.8-pre-", "gitVersion" : "2cb1691a38fcb83f7740b80eedfa2fe61c13d404", "uname" : { "sysname" : "Linux", "release" : "3.13.0-24-generic", "version" : "#46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000", "buildId" : "451B0F9519C4CDBE9B5829F6FB152D1600331926" }, { "b" : "7FFFB1EE4000", "elfType" : 3, "buildId" : "6755FAD2CADACDF1667E5B57FF1EDFC28DD1C976" }, { "b" : "7F1273F62000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3, "buildId" : "FE662C4D7B14EE804E0C1902FB55218A106BC5CB" }, { "b" : "7F1273D04000", "path" : "/lib/x86_64-linux-gnu/libssl.so.1.0.0", "elfType" : 3, "buildId" : "CA0C4DCB4A63C439D8467DCBDBBDDF66004DEC9C" }, { "b" : "7F127392A000", "path" : "/lib/x86_64-linux-gnu/libcrypto.so.1.0.0", "elfType" : 3, "buildId" : "230EBE6145B6681D0CB7E4C9021F0D899C02E0C4" }, { "b" : "7F1273722000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3, "buildId" : "92FCF41EFE012D6186E31A59AD05BDBB487769AB" }, { "b" : "7F127351E000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3, "buildId" : "C1AE4CB7195D337A77A3C689051DABAA3980CA0C" }, { "b" : "7F127321A000", "path" : "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType" : 3, "buildId" : "19EFDDAB11B3BF5C71570078C59F91CF6592CE9E" }, { "b" : "7F1272F14000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "buildId" : "574C6350381DA194C00FF555E0C1784618C05569" }, { "b" : "7F1272CFE000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "buildId" : "CC0D578C2E0D86237CA7B0CE8913261C506A629A" }, { "b" : "7F1272938000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "buildId" : "B515361E474796AF29DE9992B76A97CFFB39B2A7" }, { "b" : "7F1274180000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "9F00581AB3C73E3AEA35995A0C50D24D59A01D47" } ] }}
 m31001|  mongod(_ZN5mongo15printStackTraceERSo+0x29) [0xf0c959]
 m31001|  mongod(+0xB0C512) [0xf0c512]
 m31001|  mongod(+0xB0C83E) [0xf0c83e]
 m31001|  libpthread.so.0(+0x10340) [0x7f1273f72340]
 m31001|  mongod(_ZNK5mongo8Database23getDatabaseCatalogEntryEv+0x0) [0x903ca0]
 m31001|  mongod(_ZN5mongo16CmdListDatabases3runEPNS_16OperationContextERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x814) [0x955a54]
 m31001|  mongod(_ZN5mongo12_execCommandEPNS_16OperationContextEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x34) [0x9b5d64]
 m31001|  mongod(_ZN5mongo7Command11execCommandEPNS_16OperationContextEPS0_iPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0xC84) [0x9b6c24]
 m31001|  mongod(_ZN5mongo12_runCommandsEPNS_16OperationContextEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x1F1) [0x9b76b1]
 m31001|  mongod(_ZN5mongo11newRunQueryEPNS_16OperationContextERNS_7MessageERNS_12QueryMessageERNS_5CurOpES3_b+0x1037) [0xbaa287]
 m31001|  mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortEb+0xDB4) [0xa8d004]
 m31001|  mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0xE0) [0x7f30f0]
 m31001|  mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x441) [0xebff01]
 m31001|  libpthread.so.0(+0x8182) [0x7f1273f6a182]
 m31001|  libc.so.6(clone+0x6D) [0x7f1272a32fbd]



 Comments   
Comment by Kaloian Manassiev [ 30/Oct/14 ]

Confirmed it was done.

Comment by Eliot Horowitz (Inactive) [ 30/Oct/14 ]

this was done i believe

Comment by Githook User [ 08/Oct/14 ]

Author:

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

Message: SERVER-15549 listDatabases command should only list existent databases

The database information is split between the storage-engine database
catalog and the database metadata, which could potentially be in-memory,
but not created on disk yet. The cases where this happens are only
applicable to the Admin database.

This change makes the listDatabases command only list databases from the
storage-engine's catalog.
Branch: master
https://github.com/mongodb/mongo/commit/c46e86610205985ae9744685e62fe269e03835e1

Comment by Githook User [ 07/Oct/14 ]

Author:

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

Message: SERVER-15549 Remove AuthzManagerExternalState::getAllDatabaseNames
Branch: master
https://github.com/mongodb/mongo/commit/3dc01f82dd8b49377fbedfbceb3ae2f92f1e39e7

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