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

bi-directional full sync #131

Conversation

CorgiMan
Copy link
Contributor

No description provided.

if fullSync {
// TODO: handle full sync
go func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems wasteful to me. If the sender applies the changes from the receiver and their checksums match, a bidirectional full-sync wouldn't be needed. Now what we've got is bi-directional full-syncs by default.

Also, the unbounded go-routine creation frightens me a bit. I know they're meant to be lightweight, but not handling this by throttling the amount of bi-directional full-syncs that we issue seems like something that would come back to haunt us, at scale.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it will full-sync all the time: if checksums match, it will return false:

return changes, false

However, I agree with the second argument: we should throttle the number of goroutines we spawn here, possibly one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think what Jeff means is that if the one way full sync fixes the membership, we don't need the reverse full sync

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think of this as wasteful. Full syncs are necessary because less wasteful methods: the normal dissemination protocol, has failed. I'm okay if the emergency mechanism is very wasteful, yet effective. As of now, it's half as wasteful and half as effective.

In some sense the reverse full syncs are already throttled by the average of receiving 5 pings per second. If we can't trust that this is always the case, I agree that we should throttle the reverse full syncs. One at the time seems appropriate to me.

…tForConvergence

Ws refactor calls disco provider wait for convergence
@CorgiMan CorgiMan force-pushed the ws-bidirectional-full-sync branch 2 times, most recently from 8375d8d to e32e826 Compare March 29, 2016 18:35
@CorgiMan CorgiMan closed this Apr 5, 2016
@CorgiMan CorgiMan deleted the ws-bidirectional-full-sync branch April 5, 2016 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants