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

improve additional teams lookup #2445

Merged
merged 7 commits into from
Oct 16, 2023
Merged

improve additional teams lookup #2445

merged 7 commits into from
Oct 16, 2023

Conversation

FxKu
Copy link
Member

@FxKu FxKu commented Oct 12, 2023

We came across a team mapping resource where 11 teams where cross referencing one another. Although the lookup of additional teams is already and exclusion filter it seemed that there were still to many lookups performed bringing the operator to a halt.

"DeltaFIFO Pop Process" ...,Depth:946,Reason:slow event handlers blocking the queue

The PR changes how fetchAdditionalTeams must be called. The team for which the lookup is done must already be added to the exclude filter so that additional teams will be added to the filter as well before doing a recursive call. Transitive teams will be added to the exclude filter, too, to avoid unnecessary look ups in case they are also an additional team to the original team.

I counted the lookups for one of the unit tests and the number of loops was reduced from 11 to 5 with only little cross-referecing.

@FxKu FxKu added this to the 2.0 milestone Oct 12, 2023
pkg/teams/postgres_team.go Outdated Show resolved Hide resolved
pkg/teams/postgres_team.go Outdated Show resolved Hide resolved
@FxKu
Copy link
Member Author

FxKu commented Oct 16, 2023

👍

1 similar comment
@jopadi
Copy link
Member

jopadi commented Oct 16, 2023

👍

@FxKu FxKu merged commit f41c14f into master Oct 16, 2023
2 checks passed
@FxKu FxKu deleted the pgteam-lookup-loop branch October 16, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants