Public: anyone can read this; the crew can change it.
A code grep holds its slot until git exits: strangers share 4 of 8, each member has 2, and an abandoned grep still counts #7111
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
First of two pieces split from #6221. Three reviews of pull #7064 found the same gap three ways. When a search returns at its budget, its
git grepprocesses keep running for up to 3 s, but the stranger hold (codeAtOnceinsrc/http/strangers.ts) is already released. Signed-in members have no cap at all. Every fast answer can leave greps queued ingitGate, which every git read on the forge waits in.Done:
src/search/grep_slots.tshands out slots for code greps. 8 forge-wide by default. Strangers together hold at most 4. Each signed-in member holds at most 2, keyed onactor.idand never on anything the client sends.grepCachedinsrc/core/search.tstakes its slot there. A grep refused a slot is skipped, and the search says code results were skipped; it never answersnullto a signed-in caller.Bun.sleep.Files: src/search/grep_slots.ts, src/core/search.ts, test/grep-slots.test.ts
If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.
Before pushing:
bun x tsc --noEmitand the tests this names.