-
Notifications
You must be signed in to change notification settings - Fork 287
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
Do conntrack deletions in the background. #1498
Conversation
Block on pending deletions if IP is reused.
@neiljerram, @doublek tested this and found it to be a strict improvement over what we have now in his high-connection-load testing. Please can you review? |
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.
Very nice change - but a couple of thoughts to consider.
@@ -347,6 +355,45 @@ func (r *RouteTable) syncRoutesForLink(ifaceName string) error { | |||
return nil | |||
} | |||
|
|||
// startConntrackDeletion starts the deletion of conntrack entries for the given CIDR in the background. Pending | |||
// deletions are tracked in the pendingConntrackCleanups map so we can block waiting for them later. |
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.
I think we need a bit more context somewhere to record why we're making this change to move conntrack deletions into the background. I'd be happy with any of:
- adding to the comment here
- adding to the commit message
- adding more to the PR comments - either inline explanation or a link to an issue where it's explained.
At the moment - unless I missed it - I don't think we have any of those.
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.
I have added an issue and updated the comment.
routetable/route_table_test.go
Outdated
}) | ||
start := time.Now() | ||
rt.Apply() | ||
Expect(time.Since(start)).To(BeNumerically("<", 10*time.Millisecond)) |
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 looks fragile if we're running on a really slow test VM. One option would be a factor of 10, as 0.3s would still be nearly unnoticeable. Is there anything better we can do?
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.
I couldn't think of a better way to interlock the test without quite a bit of plumbing. Let's just up the timer.
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.
Thanks.
retest this please |
Do conntrack deletions in the background.
Block on pending deletions if IP is reused. Improves the slow performance observed in https://github.com/projectcalico/felix/issues/1501
Todos
Release Note