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

serialize broadcast topology updates and coalesce updates #117

Merged
merged 6 commits into from
Oct 10, 2019

Conversation

murali-reddy
Copy link
Contributor

This PR is an attempt to address high topology updates gossip's that can result in certain use-cases.

  • minimizes the concurrent topology gossip broadcast updates
  • coalesce the topology updates when possible before sending gossip broadcast

Fixes #116

updates then coalesce into a single update to gossip

Fixes #116
@murali-reddy murali-reddy changed the title serialize brodcast topology updates and coalesce updates serialize broadcast topology updates and coalesce updates Sep 18, 2019
local_peer.go Outdated Show resolved Hide resolved
local_peer.go Outdated Show resolved Hide resolved
local_peer.go Outdated Show resolved Hide resolved
local_peer.go Outdated Show resolved Hide resolved
@murali-reddy
Copy link
Contributor Author

updated PR as per review comments. PTAL

router.go Outdated Show resolved Hide resolved
local_peer.go Outdated Show resolved Hide resolved
local_peer.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

Looks good. Does it work?

local_peer.go Outdated
}
}
}

func (peer *localPeer) broadcastPendingTopologyUpdates() {
peer.router.Routes.recalculate()
Copy link
Contributor

Choose a reason for hiding this comment

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

Because this is async, I think it's unwise to move it here.
I'm not entirely sure it was ever necessary, but left at the original place there is some chance it will happen before the broadcast.

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'm not entirely sure it was ever necessary

I changed it so to avoid recalculate an every add/delete connection. But considering #111
I reverted to keep original calls to routes.recalculate().

Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

Sorry I need to withdraw my approval as unit tests are failing.
I couldn't see an easy fix.

@murali-reddy
Copy link
Contributor Author

Sorry I need to withdraw my approval as unit tests are failing. I couldn't see an easy fix.

Fixed the UT. Added sendPendingTopologyUpdates in similar lines to sendPendingGossip

@bboreham bboreham merged commit a1ec9f8 into master Oct 10, 2019
@bboreham bboreham deleted the coalesce-topology-updates branch October 10, 2019 14:10
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.

in fullly connected mesh topolgy, topology update gossip's can get chatty
2 participants