Skip to content

Fix hanging during remote project search - #65257

Merged
SomeoneToIgnore merged 1 commit into
mainfrom
kb/remote-project-search-hang
Oct 7, 2026
Merged

SomeoneToIgnore merged 1 commit into
mainfrom
kb/remote-project-search-hang

Conversation

@SomeoneToIgnore

Copy link
Copy Markdown
Contributor

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.
    BufferStore now owns transfers, so dropping the caller no longer cancels them.

Release Notes:

  • Fixed hanging during remote project search

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Oct 6, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Oct 6, 2026
@SomeoneToIgnore
SomeoneToIgnore added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit 8323e23 Oct 7, 2026
50 checks passed
@SomeoneToIgnore
SomeoneToIgnore deleted the kb/remote-project-search-hang branch October 7, 2026 10:01
@SomeoneToIgnore

Copy link
Copy Markdown
Contributor Author

/cherry-pick preview
/cherry-pick stable

@zed-zippy

zed-zippy Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

πŸ’πŸ’₯ Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/37604979497

@zed-zippy

zed-zippy Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

πŸ’πŸ’₯ Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/37604984735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't hang when search queries change

2 participants