Files
nats-server/server
Ivan Kozlovic c4a284b58f Fix stop of consumer's delivery loop
I noticed that some consumer go routines were left running at the end
of the test suite.
It turns out that there was a race the way the consumer's qch was closed.
Since it was closed and then set to nil, it is possible that the go
routines that are started and then try to capture o.qch would actually
get qch==nil, wich then when doing a select on that nil channel would
block forever.

So we know pass the qch to the 2 go routines loopAndGatherMsgs() and
loopAndDeliverMsgs() so that when we close the channel there is
no risk of that race happening.

I do believe that there is still something that should be looked at:
it seems that a consumer's delivery loop can now be started/stopped
many times based on leadership acquired/lost. If that is the case,
I think that the consumer should wait for previous go routine to
complete before trying to start new ones.

Also moved 3 JetStream tests to the test/norace_test.go file because
they would consumer several GB of memory when running with the -race flag.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-01-19 17:39:32 -07:00
..
2020-06-12 15:48:38 -07:00
2020-05-19 14:15:11 -07:00
2020-11-30 20:08:44 -07:00
2020-12-14 19:48:54 -05:00
2020-02-25 19:53:09 -05:00
2021-01-14 01:14:52 -08:00
2021-01-17 13:48:40 -08:00
2021-01-14 01:14:52 -08:00
2021-01-14 06:54:08 -08:00
2020-11-17 18:57:45 +00:00
2021-01-14 01:14:52 -08:00
2021-01-14 01:14:52 -08:00
2021-01-14 01:14:52 -08:00
2021-01-14 01:14:52 -08:00
2021-01-14 01:14:52 -08:00
2019-05-06 15:41:38 -07:00
2021-01-14 02:52:35 -07:00
2021-01-14 01:14:52 -08:00
2020-12-10 10:55:41 -07:00
2019-12-12 11:58:24 -07:00
2018-12-06 15:09:14 -08:00
2021-01-07 18:19:25 -05:00
2021-01-14 01:14:52 -08:00
2021-01-14 01:14:52 -08:00
2020-06-12 10:03:47 -06:00
2021-01-17 13:34:56 -08:00
2018-10-06 14:06:14 -07:00
2021-01-14 01:14:52 -08:00
2020-11-30 20:08:44 -07:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2019-11-14 20:05:32 -07:00
2019-12-12 11:58:24 -07:00
2021-01-14 01:14:52 -08:00
2021-01-13 20:59:36 -07:00
2021-01-13 20:59:36 -07:00