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

Changed acquisition function to release the TimeoutLock when not actively querying data #614

Closed
wants to merge 1 commit into from

Conversation

bbixler500
Copy link
Contributor

Changed acquisition function to release the TimeoutLock when not actively querying data

Description

Currently the acq process always holds the TimeoutLock and periodically releases and reacquires the lock to allow other commands to process. These changes make it so that the acq process only holds the TimeoutLock when it is actively querying data and otherwise leaves the lock released.

Motivation and Context

The acq process only releases the lock every 5 seconds, while most other commands only have a 3 second timeout for acquiring the TimeoutLock. Thus around 40% of all issued commands return false with a timeout error.

How Has This Been Tested?

This has not been tested yet. I mostly wanted to start the pull request so others could see the proposed changes and make comments/changes

Types of changes

  • 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 not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@ykyohei
Copy link
Contributor

ykyohei commented Jan 11, 2024

Just for your information, this PR #606 also addresses the similar timeout lock issue more fundamentally.

@jlashner
Copy link
Collaborator

Hi Bryce, I think this change looks good, so if you need this ASAP and are able to test, I'm happy to approve.

As Kyohei mentinoed though, this PR #606 restructures the PID agent to avoid Timeout lock entirely to fix this issue, so this change will be overwritten when that gets merged in.

@bbixler500
Copy link
Contributor Author

Currently I have a work around where I just disable the acq process whenever I want to issue commands to the agent so I don't need these changes merged immediately. I'm fine to just wait until the larger changes have been implemented.

@bbixler500 bbixler500 closed this Jan 11, 2024
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 this pull request may close these issues.

3 participants