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

Semaphore fix #151

Merged
merged 9 commits into from
Aug 8, 2024
Merged

Semaphore fix #151

merged 9 commits into from
Aug 8, 2024

Conversation

rvazarkar
Copy link
Contributor

@rvazarkar rvazarkar commented Aug 7, 2024

Description

Our locking mechanism for ldap queries was being used incorrectly, leading to potential deadlocks and most likely general slowdowns. Move our query logic down into the connection pools and only lock the semaphore when a query is actively being performed

We also wrap all of our computer API calls in a timeout to ensure that queries that go out to lunch dont infinitely hang with a very generous 2 minute timeout by default

Additionally, up our default port scan timeout to 10 seconds. As the port scanner is checking asynchronously, this should not result in a significant performance loss as other coroutines will continue work. Testing discovered that the coroutine scheduler is not "fair" and that port scanner results varied significantly between -c All and -c LoggedOn for example.

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Documentation updates are needed, and have been made accordingly.
  • I have added and/or updated tests to cover my changes.
  • All new and existing tests passed.
  • My changes include a database migration.

Copy link
Collaborator

@zinic zinic left a comment

Choose a reason for hiding this comment

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

This looks tight. Good find on the connection logic.

@definitelynotagoblin definitelynotagoblin merged commit d8e6757 into v4 Aug 8, 2024
3 checks passed
@definitelynotagoblin definitelynotagoblin deleted the semaphore_fix branch August 8, 2024 19:00
@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 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.

3 participants