[SERVER-21241] Record timestamp in root of sample document Created: 01/Nov/15 Updated: 17/Nov/15 Resolved: 06/Nov/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0-rc3 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Bruce Lucas (Inactive) | Assignee: | Mark Benvenuto |
| Resolution: | Done | Votes: | 1 |
| Labels: | FTDC | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Minor Change |
| Sprint: | Platform C (11/20/15) |
| Participants: |
| Description |
|
Currently timestamps are recorded in a few places (_id for chunk, start/end for each data source). However for certain kinds of filtering operations it is useful to have a guaranteed reliable place to find a timestamp for each sample. Currently the closest is serverStatus.start (or serverStatus.localTime), but that is potentially fragile in that it is tied to a particular data source (serverStatus), and as we expand the range of data sources (collections, system stats, etc.) we will want to make some data sources optional, and for consistency we may wish to make every data source optional. A more robust and future-proof design would be to have a "start" (and possibly "end") timestamp for each sample at the root of the sample document, independent of any particular data source. If we do this now, the tooling could be made more future proof by using that as the timing source for the sample rather than relying on timestamps in serverStatus. Ideally the _id for the chunk would be the same as the start field of the first sample (although this is not a requirement). |
| Comments |
| Comment by Githook User [ 06/Nov/15 ] | ||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}Message: | ||||||||||||||||||||||||||||||||||
| Comment by Bruce Lucas (Inactive) [ 04/Nov/15 ] | ||||||||||||||||||||||||||||||||||
|
Yes, that is correct. (Specifically I care about "start", but it seems natural to also have "end" for consistency). | ||||||||||||||||||||||||||||||||||
| Comment by Mark Benvenuto [ 04/Nov/15 ] | ||||||||||||||||||||||||||||||||||
|
The current BSON document is as follows: Example:
The BinData blob has this format for the reference document:
Your proposal is to have the following:
|