Files
nats-server/test
Ivan Kozlovic 2a8973a62b Fixed flushOutbound
With Go 1.12 (strangely was not able to reproduce with Go 1.11)
the test TestRouteNoCrashOnAddingSubToRoute() would frequently
locks up and consume all avail CPUs on the machine. Running
this test with GOMAXPROCS=2 you would see server.test CPU usage
pegged at 200% (assuming you have at least 2 CPUs).
The reason was that the writeLoop was spinning because another
routine was already in flushOutbound() and stack trace would
show that it was stuck in system calls. It seems that even though
the writeLoop does release the lock but grab it right away was
not allowing the syscall to complete.

So decided to put back the unlock/gosched/lock back in flushOutbound()
when flag is already set, but then protect the closeConnection()
with its own flag (similar to clearConnection) to not re-introduce
issue fixed in #1092.

Had to fix the benchmark test RoutedInterestGraph because after a
route is accepted, the initial PING will be sent after 1sec which
was breaking this test.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-08-29 12:59:27 -06:00
..
2018-01-15 15:27:18 -08:00
2019-08-29 12:59:27 -06:00
2019-05-10 15:11:30 -07:00
2019-08-23 14:08:07 -06:00
2019-08-26 09:34:17 -06:00
2019-08-26 09:34:17 -06:00
2018-03-15 22:31:07 -07:00
2019-07-28 07:10:37 -07:00
2019-08-26 09:34:17 -06:00
2019-08-26 09:34:17 -06:00
2018-09-10 14:50:48 -07:00
2019-08-15 09:06:56 -06:00