[SERVER-7057]  there's not way of finding out the physical disk location of where the actual index is located Created: 18/Sep/12  Updated: 15/Feb/13  Resolved: 18/Sep/12

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Storage
Affects Version/s: 2.0.6, 2.2.0
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Xuguang zhan Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File Re where does the index info data store in mongodb disk dir.msg    
Participants:

 Description   

As we know MongoDB index structure is Btree,I am not sure the memory data store in which place , whether it also store in the disk.
so I do a test, connect with ./mongo --port *****

add a index in memory not insert data , wbxcuser.X will be enlarge, so we guess it have store the index data like real object store .
16404 rw------ 1 root root 16777216 Sep 10 07:18 wbxcuser.ns
65604 rw------ 1 root root 67108864 Sep 10 07:18 wbxcuser.0
131204 rw------ 1 root root 134217728 Sep 10 07:18 wbxcuser.1
262404 rw------ 1 root root 268435456 Sep 10 08:02 wbxcuser.2
524804 rw------ 1 root root 536870912 Sep 11 01:41 wbxcuser.3
1049604 rw------ 1 root root 1073741824 Sep 11 02:10 wbxcuser.4

but communicate with Mark Hillick

answer:As far as I know, there's not way of finding out the physical disk location of where the actual index is located. If you want to make a feature request for such an option, please create a request on JIRA.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 18/Sep/12 ]

 
> db.foo.insert( { x : 1 } )
> db.foo.ensureIndex( { x : 1 } )
> db.system.namespaces.find( { name : /^test.foo/ } )
{ "name" : "test.foo.$x_1" }
{ "name" : "test.foo.$_id_" }
{ "name" : "test.foo" }
> db["foo.$x_1"].validate( true ).extents
[
	{
		"loc" : "2:4940000",
		"xnext" : "null",
		"xprev" : "null",
		"nsdiag" : "test.foo.$x_1",
		"size" : 36864,
		"firstRecord" : "2:4941000",
		"lastRecord" : "2:4941000"
	}
]

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