-
Notifications
You must be signed in to change notification settings - Fork 5
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
Periodically trigger database writes when write volume is insufficient #39
Conversation
…dually. Consistency proof of concept of writing and subsequently reading an item.
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.
Only comment is about Bucket(). I'm not gonna worry too much about the rest of it, because we've already discussed how this is going to be refactored anyway
@@ -45,6 +47,30 @@ func (r *ReadArgs) Encode(trustDomains []*TrustDomainConfig) (out EncodedReadArg | |||
return | |||
} | |||
|
|||
// Bucket returns the bucket index that a read requests, or -1 for invalid args. | |||
func (r *ReadArgs) Bucket() int { |
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.
This function is unused?
I'd either add some tests or remove it.
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.
Added the function for debugging. it was nice to be able to recover the bucket i was expecting a write to go into / a read to be of as it left the RequestManager. I'll add a test.
Minimal Command Line
Working Demo
Introduce a NextEpoch RPC between leader and followers so leader can explicitly trigger a database flip.
This is gonna be a weird thing to try and get consistent order. I'm not convinced this is the 'correct' way. Instead, there should be a flag in a write that follows the same channel delivery system to signal it. The problem is how followers can identify the special write has been triggered by the leader, and isn't a malicious client RPC. This works as a placehodler until that solution is done.