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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated to glog
  • Loading branch information
Harshil Goel committed Jul 13, 2023
commit fadddcc6885393f32b2f5ab43260f375c896663e
7 changes: 4 additions & 3 deletions x/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,21 @@ import (
"github.com/dgraph-io/badger/v4"
bpb "github.com/dgraph-io/badger/v4/pb"
"github.com/dgraph-io/dgraph/protos/pb"
"github.com/golang/glog"
harshil-goel marked this conversation as resolved.
Show resolved Hide resolved
)

func PrintRollup(plist *pb.PostingList, parts map[uint64]*pb.PostingList, baseKey []byte, ts uint64) {
k, _ := Parse(baseKey)
log.Printf("[TXNLOG] DOING ROLLUP for key: %+v at timestamp: %v\n", k, ts)
glog.V(2).Infof("[TXNLOG] DOING ROLLUP for key: %+v at timestamp: %v\n", k, ts)
harshil-goel marked this conversation as resolved.
Show resolved Hide resolved
}

func PrintMutationEdge(plist *pb.DirectedEdge, key ParsedKey, startTs uint64) {
log.Printf("[TXNLOG] ADDING MUTATION at TS: %v, key: %v, value: %v \n", startTs, key.String(), plist)
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

}

func PrintOracleDelta(delta *pb.OracleDelta) {
for _, status := range delta.Txns {
log.Printf("[TXNLOG] COMMITING: startTs: %v, commitTs: %v\n", status.StartTs, status.CommitTs)
glog.V(2).Infof("[TXNLOG] COMMITING: startTs: %v, commitTs: %v\n", status.StartTs, status.CommitTs)
harshil-goel marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down