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

Add support for dataset load with multiple processes #23

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

daverigby
Copy link
Collaborator

Problem

Combining dataset loading (--pinecone-dataset) and multiple processes (--processes) does not currently work due to interactions between multithreading used by google.cloud.storage to download dataset files, and fork()ing done by locust to create multiple processes.

Solution

Fix this by only performing Dataset downloading in the parent process when locust is first started ('init' event), and having the child processes only read the already-downloaded dataset files later when the test starts ('test_start' event). This also avoids any unnecessary / conflicting download of the same data multiple times.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Test Plan

New integration test added.

Combining dataset loading (--pinecone-dataset) and multiple processes
(--processes) does not currently work due to interactions between
multithreading used by google.cloud.storage to download dataset files,
and fork()ing done by locust to create multiple processes.

Fix this by only performing Dataset downloading in the parent process
when locust is first started ('init' event), and having the child
processes only read the already-downloaded dataset files later when
the test starts ('test_start' event). This also avoids any unnecessary
/ conflicting download of the same data multiple times.
@daverigby daverigby merged commit 0a347f3 into main Feb 14, 2024
7 checks passed
@daverigby daverigby deleted the load_data_multi_process branch February 14, 2024 11:54
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.

1 participant