[DOCS-11050] db.collection.stats metrics are not all sync'd after the call to validate Created: 22/Nov/17 Updated: 13/Nov/23 Resolved: 09/Feb/22 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0, 4.4.0, 5.0.0, 5.2.0, 5.3.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Arnie Listhaus | Assignee: | Jason Price |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 2 years, 1 day ago |
| Epic Link: | DOCSP-11701 |
| Story Points: | 3 |
| Description |
|
The collstats documentation states: After an unclean shutdown of a mongod using the Wired Tiger storage engine, size statistics reported by collStats may be inaccurate. The amount of drift depends on the number of insert, update, or delete operations performed between the last checkpoint and the unclean shutdown. Checkpoints usually occur every 60 seconds. However, mongod instances running with non-default --syncdelay settings may have more or less frequent checkpoints. Run validate on each collection on the mongod to to restore the correct statistics after an unclean shutdown. The final paragraph implies that all statistics will be trued up after validate is run. However, this is not the case. In terms of count: `validate()` will only true up the fast count if it is off as the result of an unclean shutdown. In general usage the fast count in WT should be considered an estimate (particularly if there are active writes to a collection) Moreover, other metrics like the number of documents inserted or removed will not be trued up either. Please update the documentation to clarify what is guaranteed to be accurate after a call to validate. |
| Comments |
| Comment by Githook User [ 09/Feb/22 ] |
|
Author: {'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}Message:
Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com> Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com> |
| Comment by Githook User [ 09/Feb/22 ] |
|
Author: {'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}Message:
Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com> Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com> |
| Comment by Githook User [ 08/Feb/22 ] |
|
Author: {'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}Message:
Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com> Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com> |
| Comment by Githook User [ 08/Feb/22 ] |
|
Author: {'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}Message:
Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com> Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com> |
| Comment by Githook User [ 08/Feb/22 ] |
|
Author: {'name': 'jason-price-mongodb', 'email': '69260375+jason-price-mongodb@users.noreply.github.com', 'username': 'jason-price-mongodb'}Message:
Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com> |
| Comment by Bruce Lucas (Inactive) [ 27/Nov/17 ] |
Note that there's nothing for validate to true up for these metrics as they are explicitly, like all operation counters, counts of inserts and removes since the mongod process was started. This is implicit in the note under the "metrics" heading
This could be clarified to indicate that this means that all of these metrics start at 0 each time mongod is started. |