Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore(raft): Add debug logs to print all transactions #8890

Merged
merged 12 commits into from
Jul 17, 2023

Conversation

harshil-goel
Copy link
Contributor

@harshil-goel harshil-goel commented Jun 28, 2023

Add debug logs to print all transactions. This will reside under BUILD_TAGS=debug.

Live loader time on main: 17 min 28 sec
Live loader time with change: 16mins 21 sec
Live loader time with change, with debug on: 18 min 9 sec

Debug logs looks like:

ADDING MUTATION at TS: 2533, key: UID: 3119251, Attr: 0-starring, Data key, value: entity:3119251 attr:"0-starring" value_type:UID value_id:1232342  
Doing rollup for key: {4 0-director.film 1211879 false 0  0 0} at timestamp: 1580
COMMITING: 1691 1702

Fixes: DGRAPHCORE-17

@dgraph-bot dgraph-bot added area/core internal mechanisms area/testing Testing related issues go Pull requests that update Go code labels Jun 28, 2023
Copy link
Contributor

@mangalaman93 mangalaman93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test comment

Copy link
Contributor

@mangalaman93 mangalaman93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update the description now

x/debug.go Outdated Show resolved Hide resolved
x/debug.go Outdated Show resolved Hide resolved
x/nodebug.go Outdated Show resolved Hide resolved
x/nodebug.go Outdated Show resolved Hide resolved
x/debug.go Outdated Show resolved Hide resolved
x/debug.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mangalaman93 mangalaman93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more comments, once you address those, the PR is good to go.

x/debug.go Outdated Show resolved Hide resolved
x/debug.go Outdated Show resolved Hide resolved
x/debug.go Outdated
}

func PrintMutationEdge(plist *pb.DirectedEdge, key ParsedKey, startTs uint64) {
glog.V(2).Infof("[TXNLOG] ADDING MUTATION at TS: %v, key: %v, value: %v \n", startTs, key.String(), plist)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need the space and \n at the end

x/debug.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mangalaman93 mangalaman93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please fix the title based on the instruction in the PR Template file as well as add the JIRA ticket number to the description.

@harshil-goel
Copy link
Contributor Author

Also, please fix the title based on the instruction in the PR Template file as well as add the JIRA ticket number to the description.

Could you tell me what the PR title should look like / where the PR template file is?

@harshil-goel harshil-goel changed the title Topic(chore): Add debug logs to print all transactions Chore(raft): Add debug logs to print all transactions Jul 17, 2023
@harshil-goel harshil-goel merged commit 95e8b34 into main Jul 17, 2023
11 checks passed
@harshil-goel harshil-goel deleted the harshil-goel/add-debug-logs branch July 17, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core internal mechanisms area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

5 participants