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

Adding log lines to help troubleshoot snapshot and rollup #3889

Merged
merged 1 commit into from
Sep 6, 2019
Merged
Changes from all commits
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
4 changes: 4 additions & 0 deletions worker/draft.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ func (n *node) processRollups() {
return
case readTs = <-n.rollupCh:
case <-tick.C:
glog.V(3).Infof("Evaluating rollup readTs:%d last:%d rollup:%v", readTs, last, readTs > last)
Copy link

Choose a reason for hiding this comment

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

You might want to add a space between all the : and the actual words for readability in the logtrace.

example readTs:%d -> readTs : %d

Ditto for the other log statement that was added in this PR.

if readTs <= last {
break // Break out of the select case.
}
Expand Down Expand Up @@ -691,6 +692,9 @@ func (n *node) checkpointAndClose(done chan struct{}) {
// Save some cycles by only calculating snapshot if the checkpoint has gone
// quite a bit further than the first index.
calculate = chk >= first+uint64(x.WorkerConfig.SnapshotAfter)
glog.V(3).Infof("Evaluating snapshot first:%d chk:%d (chk-first:%d) "+
"snapshotAfter:%d snap:%v", first, chk, chk-first,
x.WorkerConfig.SnapshotAfter, calculate)
}
}
// We keep track of the applied index in the p directory. Even if we don't take
Expand Down