This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now that |
acelyc111
reviewed
Feb 28, 2020
acelyc111
approved these changes
Mar 2, 2020
levy5307
reviewed
Mar 2, 2020
mlog->set_valid_start_offset_on_open(mu->data.header.pid, 0); | ||
} | ||
char timestamp_buf[32]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不需要32位这么长吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22 bytes actually. 32 is for memory alignment.
hycdong
approved these changes
Mar 4, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
mlog_dump used to print two lines for a mutation, one line for mutation header, and the other for mutation content. Two lines make it inconvenient for data searching (grep/awk). So we combined the two into one line in this PR.
For most of our use cases of mlog_dump, it's used to search data in the specified time range, in order to find hotkeys, or find business-related information. However, the mutation timestamp is printed as long int like "timestamp=1582715060503806", not suitable for time search. So we format the timestamp into "YYYY-mm-dd hh:mm:ss.SSS". For example: "timestamp=2020-02-26 19:04:20.453".
Result: