[SERVER-9102] Improve Format of OpTime (Timestamp) Strings Created: 23/Mar/13 Updated: 06/Dec/22 Resolved: 31/Aug/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Logging |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Backlog - Replication Team |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Optime.toStringPretty() should look like this:
Instead of this one which looks like "a1" (the increment) is the milliseconds fields.
|
| Comments |
| Comment by Matt Kangas [ 21/Aug/13 ] | ||||||||||||||||||||||||||||||||||||||||
|
Places where this change will be used: OpTime.toStringPretty
OpTime.toStringLong
OpTime.toString... harder to search for usages | ||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Daniels (Inactive) [ 23/Jul/13 ] | ||||||||||||||||||||||||||||||||||||||||
|
Pull Request: | ||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Daniels (Inactive) [ 23/Jul/13 ] | ||||||||||||||||||||||||||||||||||||||||
|
Before: toStringLong(): Mar 21 05:31:25 514a9b2d:a1 After: toStringLong(): Mar 21 05:31:25 514a9b2d (a1) | ||||||||||||||||||||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 23/Jul/13 ] | ||||||||||||||||||||||||||||||||||||||||
|
Yep, we can clean them all up and get rid of the unused char[] also. Can you post the outputs from each before and after for posterity? | ||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Daniels (Inactive) [ 23/Jul/13 ] | ||||||||||||||||||||||||||||||||||||||||
|
Should we change OpTime.toString() and OpTime.toStringLong() to reflect this as well? The only difference in these two is that there is only one : separator and both values are hex; could still be confusing. Also for clarification, OpTime.toStringLong() sets up a buffer for use with time_t_to_String but never uses it. Instead, it uses time_t_to_String_short() for printing secs. Looks like it should be (disregarding () for ordinal):
|