mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 11:24:44 -07:00
Under certain situations large number of consumers that are racing to update state or delete their stores during a delete would start taking up OS threads due to blocking disk IO. When this happened and their were a bunch of Go routines becoming runnable the Go runtime would create extra OS threads to fill in the runnable pool and would exhaust the max thread setting. This code places a channel as a simple semaphore to limit the number of disk IO blocking OS threads. Signed-off-by: Derek Collison <derek@nats.io>
108 KiB
108 KiB