8000 prevent excessive ring fragmentation due to repeated space requests by rade · Pull Request #2184 · weaveworks/weave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

prevent excessive ring fragmentation due to repeated space requests #2184

Merged
merged 4 commits into from
Apr 25, 2016

Conversation

rade
Copy link
Member
@rade rade commented Apr 17, 2016

Fixes #2181.

rade added 4 commits April 17, 2016 12:40
Merging a ring now indicates whether the ring has been updated. This
prevents excessive allocation retries, which in turn can result in
repeated space requests - i.e. if an allocation cannot proceed due to
lack of space - which in turn can result in excessive ring
fragmentation since many of the requests will result in the creation
of a new ring entries, due to the need to split ranges.

Fixes #2181.
@rade
Copy link
Member Author
rade commented Apr 17, 2016

I suggest reviewing the individual commits of this PR rather than the whole diff, since the refactoring makes it look far bigger than it actually is.

@bboreham
Copy link
Contributor

There can be many reasons why the ring is updated which do not behoove a repeated request for space. Would it not be better to have the code know when a request is in flight, and not to repeat that request unless we suspect the target is not going to respond?

@rade
Copy link
Member Author
rade commented Apr 18, 2016

Would it not be better to have the code know when a request is in flight, and not to repeat that request unless we suspect the target is not going to respond?

That is not easy to work out and will necessarily introduce another timeout or similar constant.

I know that this PR does not eliminate repeated space requests. I said that much in #2181 ("the problem could probably be reduced significantly").

// entries belonging to ourPeer. Returns the merged entries and an
// indication whether the merge resulted in any changes, i.e. the
// result differs from the original.
func (es entries) merge(other entries, ourPeer mesh.PeerName) (entries, bool, error) {

This comment was marked as abuse.

This comment was marked as abuse.

@bboreham bboreham added this to the 1.5.1 milestone Apr 18, 2016
@rade rade modified the milestones: 1.6.0, 1.5.1 Apr 18, 2016
@bboreham bboreham merged commit 88a044f into master Apr 25, 2016
@awh awh deleted the 2181-excessive-ring-frag branch May 6, 2016 09:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0