[SERVER-6428] db.serverStatus().recordStats should group databases under a key Created: 12/Jul/12  Updated: 06/Dec/22  Resolved: 28/Apr/17

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 2.2.0-rc1
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 1
Labels: mmap
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Participants:

 Description   

The global totals (accessesNotInMemory and pageFaultExceptionsThrown) currently occupy the same namespace as the database stats, which allows for a conflict if a database were to be named "accessesNotInMemory". This isn't an issue for BSON, as it doesn't require keys to be unique, but it would pose a problem working with this as JSON. I suggest grouping the databases under another key.

//Now
> db.serverStatus().recordStats
{
	"accessesNotInMemory" : 0,
	"pageFaultExceptionsThrown" : 0,
	"local" : {
		"accessesNotInMemory" : 0,
		"pageFaultExceptionsThrown" : 0
	},
	"test" : {
		"accessesNotInMemory" : 0,
		"pageFaultExceptionsThrown" : 0
	}
}
//Better
> db.serverStatus().recordStats
{
	"accessesNotInMemory" : 0,
	"pageFaultExceptionsThrown" : 0,
	"databases" : {
		"local" : {
			"accessesNotInMemory" : 0,
			"pageFaultExceptionsThrown" : 0
		},
		"test" : {
			"accessesNotInMemory" : 0,
			"pageFaultExceptionsThrown" : 0
		}
	}
}
 



 Comments   
Comment by Ian Whalen (Inactive) [ 28/Apr/17 ]

Closing as Won't Fix since this would be backwards incompatible for applications that depend on the output format of serverStatus() with MMAPv1 and this is just not applicable to WT.

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