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

Fix LDAP backoff retry logic for serverdown to actually use new connections #100

Merged
merged 11 commits into from
Feb 6, 2024

Conversation

rvazarkar
Copy link
Contributor

The current implementation was re-using the cached, invalid connection repeatedly and not actually creating a new one. The new implementation takes multi-consumer into account, properly creates new connections, and cleans up some bad logic around retry implementation.

src/CommonLib/LDAPUtils.cs Outdated Show resolved Hide resolved
Copy link
Collaborator

@ddlees ddlees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The semaphore makes the connection retry logic a little hard to reason about but the comments really help and it sounds like y'all are planning on refactoring this to be more async.

I left one nit but you can take it or leave it.

src/CommonLib/LDAPUtils.cs Outdated Show resolved Hide resolved
src/CommonLib/LDAPUtils.cs Outdated Show resolved Hide resolved
@rvazarkar rvazarkar merged commit 03b84c9 into v3 Feb 6, 2024
3 checks passed
@rvazarkar rvazarkar deleted the fix_ldap_retry branch February 6, 2024 18:44
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2024
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.

5 participants