[SERVER-20488] systemFlags reporting different values between our UAT and PROD servers. Created: 18/Sep/15  Updated: 21/Sep/15  Resolved: 21/Sep/15

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 2.6.8
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Sean Donders Assignee: Stennie Steneker (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-14642 running compact resets systemFlag to 0 Closed
is related to SERVER-15625 systemFlags missing from collStats co... Closed
Participants:

 Description   

systemFlags in the Stats() collection is different between our UAT and PROD servers. Our UAT servers show 1 as the value and our PROD show 0.

Below is an example of what's returned in our UAT env't. But in our Prod env't the systemFlags is zero.

UA:SECONDARY> db.customer.stats()
{
"ns" : "portfoliomanager.customer",
"count" : 14727628,
"size" : 34247146304,
"avgObjSize" : 2325,
"storageSize" : 35169865536,
"numExtents" : 35,
"nindexes" : 20,
"lastExtentSize" : 2146426864,
"paddingFactor" : 1.0180000000000002,
"systemFlags" : 1,
"userFlags" : 1,
"totalIndexSize" : 9303879200,
"indexSizes" : {
"_id_" : 477829968,
"customerKey" : 260642704,
"finRecordId" : 262948336,
"account.contractDate" : 385097776,
"account.estimatedEquity" : 361444608,
"dealerCode_vehicle.vin" : 637654416,
"personalInfo.fhash_dealerCode" : 491336720,
"personalInfo.lhash_dealerCode" : 497493248,
"personalInfo.sortHash_dealerCode" : 489660640,
"dealerCode_account.maturityDate_source_account.accountType" : 720101200,
"account.maturityDate_1_maturity.closed_1" : 405022688,
"source_1_account.accountType_1_account.maturityDate_1_active_1" : 635373312,
"source_1_account.accountType_1_account.accountModifiedTimestamp_1_active_1" : 618784208,
"valuationRequired_1_active_1" : 267028160,
"account.contractDay_1_active_1" : 387272592,
"dealerCode_1_vehicle.year_1_vehicle.make_1_vehicle.model_1" : 731711120,
"account.originalSalesPerson.sortHash_1_dealerCode_1" : 401359840,
"account.currentSalesPerson.sortHash_1_dealerCode_1" : 383961312,
"dealerCode_1_account.currentSalesPerson.userId_1_active_1" : 427694736,
"dealerCode_1_account.originalSalesPerson.fhash_1_account.originalSalesPerson.lhash_1_active_1" : 461461616
},
"ok" : 1
}

http://docs.mongodb.org/v2.6/reference/command/collStats/ states that it "Reports the flags on this collection that reflect internal server options. Typically this value is 1 and reflects the existence of an index on the _id field."

When querying UAT and PROD env'ts the getIndexes() show that an Index exists.

db.customer.getIndexes()
[
{
"v" : 1,
"key" : {
"_id" : 1
},
"name" : "_id_",
"ns" : "portfoliomanager.customer"
},......

Please advise what the Server uses this flag for, and why it may be reporting differently across env'ts.



 Comments   
Comment by Stennie Steneker (Inactive) [ 21/Sep/15 ]

Hi Sean,

The systemFlags value in collection stats is an internal bookkeeping artifact, and just indicates that the server ensured the collection's _id index for a code path where the index was required (ref: ensureHaveIdIndex()). This flag may be reset as a result of some operations that affect indexes such as compact or reIndex().

The systemFlags value does not have any user-facing impact and was actually removed prior to the MongoDB 3.0 production release. You can safely ignore this if you are diff'ing collection stats between UAT and PROD environments.

Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group.

Regards,
Stephen

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