-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
check last_pruned instead of is_pruning #2748
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…ocking single-threaded behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request modifies the pruning process for connector-credential pairs, focusing on using a 'last_pruned' timestamp instead of an 'is_pruning' boolean to address potential race conditions and improve concurrent request handling.
- Updated
backend/danswer/server/documents/cc_pair.py
to return the last pruning timestamp instead of checking if pruning is in progress - Modified
backend/tests/integration/common_utils/managers/cc_pair.py
to use 'last_pruned' timestamp in CCPairManager for pruning status checks - Changed
backend/tests/integration/tests/pruning/test_pruning.py
to use ThreadingHTTPServer for improved concurrent request handling - Adjusted
backend/tests/integration/connector_job_tests/slack/test_prune.py
to capture a timestamp before pruning for more accurate status checks
4 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
Description
Potential workaround for race condition in wait for prune and some buggy blocking behavior in default HTTPServer.
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Accepted Risk
[Any know risks or failure modes to point out to reviewers]
Related Issue(s)
[If applicable, link to the issue(s) this PR addresses]
Checklist: