-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Snapshotting pseudo state & log entry cache #2257
Conversation
@@ -1780,6 +1829,8 @@ func (l *Log) ReadFrom(r io.ReadCloser) error { | |||
return nil | |||
} | |||
|
|||
l.Logger.Printf("reading from stream") |
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.
Did you still want this for debugging?
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.
nm, I see a bunch of them below, assuming this is needed for debugging in the wild.
Interesting change, generally makes sense. I do have questions about how the system will respond if stuff that used to happen anyway, is now explicitly blocked by an active snapshot. |
Conflicts: CHANGELOG.md
+1, change generally makes sense. |
👍 from me too |
Snapshotting pseudo state & log entry cache
Overview
This pull request contains multiple changes/fixes for the
raft
package:Log.snapshotting
field that is set using thesync/atomic
package.Log.mu
mutex withlock()
andunlock()
methods for lock contention debugging. There's also aprintCaller()
method that will log the file & line of the calling function to a lock.