[SERVER-33488] WT SizeStorer dislikes RTT Created: 26/Feb/18 Updated: 29/Oct/23 Resolved: 07/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.4 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Kyle Suarez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | rollback-functional | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Repl 2018-04-09 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 56 | ||||||||||||||||
| Description |
|
Counts in the WTSizeStorer table are not adjusted in the same transaction that performs an insert/update as that would become a serialization point for concurrent inserts/deletes and would result in an expensive WCE. Instead, an atomic counter is maintained and flushed every so often to the SizeStorer. Among other things, this data is flushed on clean shutdown. These writes are not timestamped (would be difficult) and thus what's put on disk is the counts for "now" which are unlikely to be the counts as of the stable timestamp. At startup, when replication plays forward the oplog during recovery, an insert that was already accounted for in the sizestorer's view of the data, will be counted again. The proposed fix, trust the WTSizeStorer to have the proper counts for collections after recovery is played. Specifically:
These changes would keep WT counts accurate on clean shutdown, but not on rollback. |
| Comments |
| Comment by Githook User [ 07/Apr/18 ] | |||||||
|
Author: {'email': 'kyle.suarez@mongodb.com', 'name': 'Kyle Suarez', 'username': 'ksuarz'}Message: | |||||||
| Comment by Daniel Gottlieb (Inactive) [ 02/Mar/18 ] | |||||||
|
Existing tests that had coverage of this behavior and will likely be changed to temporarily use itcount:
They should be reverted to using "fast-count" as part of this patch. | |||||||
| Comment by Judah Schvimer [ 28/Feb/18 ] | |||||||
|
This ticket should add tests to ensure we maintain correct counts across clean restart. |