fix: don't use buffered without spawn in fts index training#5974
Closed
westonpace wants to merge 1 commit intolance-format:mainfrom
Closed
fix: don't use buffered without spawn in fts index training#5974westonpace wants to merge 1 commit intolance-format:mainfrom
westonpace wants to merge 1 commit intolance-format:mainfrom
Conversation
Contributor
Code ReviewP0: Compilation ErrorThe PR removes let num_parts = get_num_compute_intensive_cpus().saturating_add(2);The test module uses Fix: Add The approach (removing buffered without spawn in favor of sequential) is reasonable as a quick fix for the starvation issue described in the PR. |
Member
Author
|
Closing in favor of #5977 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When training an FTS index we load all of the partitions and merge them. The code was setup to load partitions in parallel. However, there was no
spawncall so it wasn't actually loading anything in parallel. This lead to starvation on HEAD calls. The order of operations (everything was serialized) was something like...The load request of part N file 1 would not get polled again until a lot of CPU work was done (to parse files 1-N-1). This resulted in the HEAD request being starved which looked like an S3 timeout.
This fix is the safest fix which just removes the call to buffered.
A more aggressive fix would be to add a spawn call but that could have impacts on RAM usage and I think #5970 would be an even better approach anyways. I can quickly test the spawn fix on Monday and put up a PR for that later if it looks good but wanted to get something in now.