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

Optimize locking when processing events #602

Closed
andrii-korotkov-verkada opened this issue Jul 5, 2024 · 3 comments
Closed

Optimize locking when processing events #602

andrii-korotkov-verkada opened this issue Jul 5, 2024 · 3 comments

Comments

@andrii-korotkov-verkada
Copy link
Contributor

Sometimes it takes a while until Kubernetes event is received or processed. It could be partially related to using locks when processing events. They can be optimized to use read locks sometimes.

@andrii-korotkov-verkada
Copy link
Contributor Author

See more details about the complex issue that this tries to help with here argoproj/argo-cd#18500.

andrii-korotkov-verkada added a commit to andrii-korotkov-verkada/gitops-engine that referenced this issue Jul 5, 2024
Closes argoproj#602
Use read lock for handlers getting. Refactor updating resources in the cluster cache to only acquire lock for an update itself, not calling handlers.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
andrii-korotkov-verkada added a commit to andrii-korotkov-verkada/gitops-engine that referenced this issue Jul 5, 2024
Closes argoproj#602
Use read lock for handlers getting. Refactor updating resources in the cluster cache to only acquire lock for an update itself, not calling handlers.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
andrii-korotkov-verkada added a commit to andrii-korotkov-verkada/gitops-engine that referenced this issue Jul 6, 2024
Closes argoproj#602
Use read lock for handlers getting. Refactor updating resources in the cluster cache to only acquire lock for an update itself, not calling handlers.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
andrii-korotkov-verkada added a commit to andrii-korotkov-verkada/gitops-engine that referenced this issue Jul 7, 2024
Closes argoproj#602
Use read lock for handlers getting. Refactor updating resources in the cluster cache to only acquire lock for an update itself, not calling handlers.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
@andrii-korotkov-verkada
Copy link
Contributor Author

Seems like this helps a lot!
#603 (comment)

andrii-korotkov-verkada added a commit to andrii-korotkov-verkada/gitops-engine that referenced this issue Jul 9, 2024
Closes argoproj#602
Use read lock for handlers getting. Refactor updating resources in the cluster cache to only acquire lock for an update itself, not calling handlers.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
andrii-korotkov-verkada added a commit to andrii-korotkov-verkada/gitops-engine that referenced this issue Jul 11, 2024
Closes argoproj#602
Use read lock for handlers getting. Refactor updating resources in the cluster cache to only acquire lock for an update itself, not calling handlers.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
andrii-korotkov-verkada added a commit to andrii-korotkov-verkada/gitops-engine that referenced this issue Jul 19, 2024
Closes argoproj#602
Use read lock for handlers getting. Refactor updating resources in the cluster cache to only acquire lock for an update itself, not calling handlers.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
@andrii-korotkov-verkada
Copy link
Contributor Author

The testing was misleading and it actually less locking time from faster iterate hierarchy v2 that is a problem solver. A bunch of benchmarking for the lock change shows neutral-to-regression results.

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 a pull request may close this issue.

1 participant