Make copy_index_key_recursively parallelizable #2622
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Monday ticket ref: https://man312219.monday.com/boards/7852509418/pulses/9918691722
Needed by: https://github.com/man-group/arcticdb-enterprise/pull/258
What does this implement or fix?
The function
copy_index_key_recursively
was running multiple async tasks which lead it to hang when we were starved for threads in the CPU executor, which could happen when running in parallelcopy_index_key_recursively
(as done in the LibraryCopier tool in enterprise).The problem is with the CPU pool, as that is used by enterprise and then, the code in ArcticDB used to hang when trying to write and use the cpu executor.
This PR removes the async calls where they are not needed and adds some tests for the StorageMover as that is the main user of this functionality in
ArcticDB
.The main tests are in the enterprise PR because there wea re using the functionality in parallel.
Any other comments?
Checklist
Checklist for code changes...