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

BaseVectorStoreDriver.upsert_text_artifacts concurrency bugfix #1074

Merged
merged 18 commits into from
Aug 19, 2024

Conversation

vasinov
Copy link
Member

@vasinov vasinov commented Aug 17, 2024

Describe your changes

  • Added utils.execute_futures_list_dict for executing a dict of lists of futures.
  • Fixed a concurrency bug in BaseVectorStoreDriver.upsert_text_artifacts.
  • Minor refactors.

Copy link

codecov bot commented Aug 17, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...iptape/drivers/vector/local_vector_store_driver.py 92.30% 1 Missing ⚠️
griptape/mixins/futures_executor_mixin.py 83.33% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

vachillo
vachillo previously approved these changes Aug 19, 2024
Comment on lines 21 to 26
executor = self.futures_executor

return self._futures_executor
if executor:
self.futures_executor = None

def __del__(self) -> None:
with self.thread_lock:
if self._futures_executor:
self._futures_executor.shutdown(wait=True)
self._futures_executor = None
executor.shutdown(wait=True)
Copy link
Member

Choose a reason for hiding this comment

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

None check

if executor := self.futures_executor is not None:
    executor.shutdown(wait=True)
    self.futures_executor = None

@collindutter collindutter merged commit 3aaeb6e into dev Aug 19, 2024
13 checks passed
@collindutter collindutter deleted the hotfix/execute-futures-dict branch August 19, 2024 16:34
@collindutter collindutter mentioned this pull request Jan 7, 2025
1 task
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