[SERVER-20453] Samples per chunk is off by one Created: 17/Sep/15  Updated: 15/Oct/15  Resolved: 12/Oct/15

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: 3.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Bruce Lucas (Inactive) Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: FTDC
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platform A (10/09/15)
Participants:

 Description   

With default max samples per chunk of 300, chunks may actually contain 301 samples.



 Comments   
Comment by Andrew Morrow (Inactive) [ 02/Oct/15 ]

This has been fixed, in the sense that it no longer is off by one, but requires further work to address some edge cases.

Comment by Githook User [ 01/Oct/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-20453 Count the FTDC reference document as the first sample
Branch: master
https://github.com/mongodb/mongo/commit/8438163beaf983baa2120ac6705176c2bf1a33e3

Comment by Bruce Lucas (Inactive) [ 17/Sep/15 ]

The reference document is the first sample, so there should be 1 reference document and 299 deltas for a total of 300 samples.

Comment by Mark Benvenuto [ 17/Sep/15 ]

The diagnosticDataCollectionSamplesPerChunk parameter controls how many samples are stored in the metric chunk. If you combine all the samples stored in the metric chunk with the reference document, you will get diagnosticDataCollectionSamplesPerChunk + 1 documents after the metric chunk is inflated.

This is verified by this test:
https://github.com/mongodb/mongo/blob/master/src/mongo/db/ftdc/compressor_test.cpp#L364-L379

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