[SERVER-23243] Extract time-keeping from Listener Created: 19/Mar/16 Updated: 05/Jul/16 Resolved: 14/Jun/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.9 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Samantha Ritter (Inactive) | Assignee: | Waley Chen |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Platforms 12 (04/01/16), Platforms 13 (04/22/16), Platforms 14 (05/13/16), Platforms 15 (06/03/16), Platforms 16 (06/24/16) | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
Research and answer the following questions:
|
| Comments |
| Comment by Githook User [ 13/Jun/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 25/May/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 18/May/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: Revert " This reverts commit 51ee6f1952addc650b1c719cce51fcf460e6e9e8. |
| Comment by Githook User [ 17/May/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 10/May/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 05/May/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 03/May/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 03/May/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 02/May/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: Revert " This reverts commit da38826985001daff55c7e2f723f73f5263e2dbf. |
| Comment by Githook User [ 02/May/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 28/Apr/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 25/Apr/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 15/Apr/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 15/Apr/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: BackgroundThreadClockSource & FastClockSourceFactory |
| Comment by Githook User [ 07/Apr/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: |
| Comment by Githook User [ 07/Apr/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: Renaming so we can differentiate between the two types of clocks (fast and precise): |
| Comment by Githook User [ 30/Mar/16 ] |
|
Author: {u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}Message: Step 1: getClockSource() -> getPreciseClockSource() |
| Comment by Andy Schwerin [ 21/Mar/16 ] |
|
The cheap version of my solution is to leave out the part where you detect at startup if the wallclock is fast enough to use for the "fast clock source" and assume it is not. You can then add that later, as a power and clock precision optimization. |
| Comment by Andrew Morrow (Inactive) [ 21/Mar/16 ] |
|
I like schwerin's suggestion. The listener has never been the right place for this, so I support moving it elsewhere. It would also greatly reduce the power consumption of an idle mongod since it would not wake up all the time if it had a good clock source (see |
| Comment by Andy Schwerin [ 21/Mar/16 ] |
|
I'm pretty sure that we should get the Listener out of the timekeeping business. Instead, we should add a new ClockSource to ServiceContext called "fast clock" or something, and that ClockSource should read the fastest wall clock available on the system. On systems with no built-in fast wall clock, we should use a periodic timer to build a low-resolution, fast-to-read clock for uses that do not require high resolution. The existing "getClockSource" on ServiceContext should be called getPreciseClockSource, and Date_t::now() and other clock-reading functions should be deprecated. If we do these things, we can get rid of Listener's time-keeping functionality and replace it with a sensible system. The hardest part of this plan would be testing at startup to determine which implementations of ClockSource to use for the precise and fast clocks. |