Repository navigation
Fix hanging during remote project search - #65257
Merged
Merged
Conversation
osiewicz
approved these changes
Oct 7, 2026
Contributor
Author
|
/cherry-pick preview |
Contributor
|
ππ₯ Cherry-pick did not succeed |
Contributor
|
ππ₯ Cherry-pick did not succeed |
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.
Closes #65099
Before:
before.mov
After:
after.mov
Issues:
The host checked files that were not yet open for matches, but treated every already-open buffer as a candidate.
Earlier queries leave thousands of buffers open, so later queries sent all of them to the client: 3,339 buffers for 51 real matches in one case.
Open buffers are now checked against their in-memory text first, which also stops ordinary non-SSH searches from reporting open buffers with no matches.
The host queued every candidate buffer's full contents without waiting for the client, so data from cancelled queries piled up in front of the new query's results.
A single worker shared by all searches now sends at most 64 buffers or about 1 MiB before waiting for the client to acknowledge them, and skips batches from cancelled searches.
Cancelling a search could stop a buffer transfer after the buffer was already marked as shared, so later searches waited forever for its contents.
BufferStorenow owns transfers, so dropping the caller no longer cancels them.Release Notes: