mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Fixed dios capacity to 4 due to testing under heavy load.
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -6836,7 +6836,7 @@ var dios chan struct{}
|
||||
// golang.org's semaphore seemed a bit heavy.
|
||||
func init() {
|
||||
// Based on Go max threads of 10k, limit ourselves to a max of 1k blocking IO calls.
|
||||
const nIO = 1024
|
||||
const nIO = 4
|
||||
dios = make(chan struct{}, nIO)
|
||||
// Fill it up to start.
|
||||
for i := 0; i < nIO; i++ {
|
||||
|
||||
@@ -853,9 +853,9 @@ func (s *Server) signalPullConsumers() {
|
||||
|
||||
// Shutdown jetstream for this server.
|
||||
func (s *Server) shutdownJetStream() {
|
||||
s.mu.Lock()
|
||||
s.mu.RLock()
|
||||
js := s.js
|
||||
s.mu.Unlock()
|
||||
s.mu.RUnlock()
|
||||
|
||||
if js == nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user