Batch potentially big transaction on egress firewall ACLs migration.#3463
Merged
Conversation
jcaamano
reviewed
Mar 7, 2023
jcaamano
reviewed
Mar 7, 2023
Contributor
Author
|
/retest |
Contributor
Author
|
failed because of #3447 |
jcaamano
reviewed
Mar 8, 2023
jcaamano
reviewed
Mar 8, 2023
jcaamano
reviewed
Mar 8, 2023
The default transaction timeout is 10 seconds, it can be reached when we delete all egress firewall acls during migration to port groups from switches. Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
stale acls. Signed-off-by: Nadia Pinaeva <npinaeva@redhat.com>
jcaamano
approved these changes
Mar 8, 2023
Contributor
jcaamano
left a comment
There was a problem hiding this comment.
Now I am left wondering how much time we spend with this when there is actually no migration to be done. Cross-checking that none of the ACLs are referenced from any of the switches, knowing that this will be true always but once, might not be in the same order of what we would spend with the encoding but still meaningful. So perhaps the migration itself can be approached in some other manner.
Added #3471 because there are important improvements that can be made when building the operations to be sent to the server.
Contributor
|
/retest-failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default transaction timeout is 10 seconds, it can be reached when we delete all egress firewall acls during migration to port groups from switches.
I reproduced the bug trying to delete 3M acls with random-generated UUIDs from 1 worker switch, and measured the time it takes to transact the changes on a kind cluster, here are the results:
2M(no batching) = 9.08 s
100000/batch = 7.66 s
10000/batch = 6.6 s
1000/batch = 6.97 s
Say we have 1000 nodes * 1000 ACLs ~= 1M ACLs * 1 switch = 4.38 s
That is a rough explanation for
defaultBatchSize = 1000I also updated
RemoveACLsFromLogicalSwitchesWithPredicateOpsto only delete acls that are present on the switch, since this op will be generated unconditionally on every sync