28 Commits

Author SHA1 Message Date
Ivan Kozlovic
8e4b449119 Fixed flappers
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-02-19 13:19:08 -07:00
Ivan Kozlovic
c097357b52 [FIXED] More than expected switch to Interest-Only mode for account
When an account is switched to interest-only mode due to no interest,
it was not possible to switch that account more than once. But the
function switchAccountToInterestMode() that triggers a switch could
possibly doing it more than once. This should not cause problems
but increased the number of traces in a big super cluster.

Also fixed some flappers and a data race.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-01-09 13:35:08 -07:00
Ivan Kozlovic
1b2754475b Refactor async client tests
Updated all tests that use "async" clients.
- start the writeLoop (this is in preparation for changes in the
  server that will not do send-in-place for some protocols, such
  as PING, etc..)
- Added missing defers in several tests
- fixed an issue in client.go where test was wrong possibly causing
  a panic.
- Had to skip a test for now since it would fail without server code
  change.

The next step will be ensure that all protocols are sent through
the writeLoop and that the data is properly flushed on close (important
for -ERR for instance).

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-12-12 11:58:24 -07:00
Derek Collison
ffc3c0da70 Fixed #1144, qsub performance improvements
Signed-off-by: Derek Collison <derek@nats.io>
2019-12-09 22:08:59 +01:00
Derek Collison
d7140a0fd1 Update for client rename
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-10 15:11:30 -07:00
Derek Collison
47963303f8 First pass at new cluster design
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-24 21:29:29 -07:00
Ivan Kozlovic
2a1811b600 Fixed flappers
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-26 15:58:48 -06:00
Derek Collison
50a99241ea Slow consumer updates and latency improvements.
Use pending bytes as slow consumer trigger, so reintroduce max_pending.
Improve latency with inplace flush calls when appropriate. Utilize simple
time budget for readLoop routine.

Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
00901acc78 Update license to Apache 2 2018-03-15 22:31:07 -07:00
Ivan Markin
c3455e7874 Use GetDefaultOptions from go-nats instead of deprecated DefaultOptions 2017-07-31 20:20:36 +00:00
Derek Collison
61e0b758d7 Updates for Go client rename, update vendor dependencies 2016-11-20 13:15:37 -08:00
Colin Sullivan
6281894cc5 Add staticcheck static analyzer to travis.
Included are small fixes to address warnings found in test code.  No functional changes.
2016-10-27 09:51:15 -06:00
Derek Collison
96d9ce5048 Queue subscriber performance
Reworked sublist to sort out normal subscribers from queue subscribers into
a result set that can be cached and easily iterated over.
2016-04-03 13:04:06 -07:00
Ivan Kozlovic
6263c66a40 Fixed code and tests to run on Windows
Mainly tests, but also a fix in route.go to reject a route when the
server is being shutdown.
2016-03-07 18:47:20 -07:00
Ivan Kozlovic
7c0a3b49a6 Fix cluster formation when servers connect quickly
Both seed and chained cases are now handled properly when servers
connect quickly and concurrently to one another.
When accepting a route, the server will forward the new route INFO
protocol to its known routes. In turn those routes will connect
to the new server (if not already connected).
A retry for implicit route was introduced to mitigate the issue
with two servers connecting to each other and electing the opposite
connection as the winner, resulting in both connections being dropped.
The server with smaller ID will try once to reconnect.
Some tests were fixed to handle possible extra INFO protocol.
New tests added.

Fix issue: https://github.com/nats-io/gnatsd/issues/206
2016-02-24 19:44:25 -07:00
Larry McQueary
7b5baa97d1 Corrected spelling of 'propagated' and 'propagation' 2016-02-02 12:22:49 -07:00
Ivan Kozlovic
964c277c63 Create the reconnectsDone channel big enough to prevent blocking on reconnect. Remove the explicit closing of clients, we should not have to do that. It still hangs on a windows VM though. 2015-12-08 13:56:40 -07:00
Ivan Kozlovic
a0cdd30bd9 Fix test that was failing on Windows.
* There was a bug in the send loop (use of 1 instead of i)
* On Windows specifically, the test did not exit without explicit closing of the connections (I don't think we should have to do that). This behavior combined with the send loop bug would cause this test to consume all memory on the machine.
2015-12-08 09:43:50 -07:00
Derek Collison
96bab33075 fixed import paths 2015-06-19 12:08:11 -07:00
Derek Collison
bf9d652e84 close connections for test, return on err for pub 2014-12-19 00:45:54 -06:00
Derek Collison
c44a25e3ef Shutdown servers after test 2014-12-18 23:17:01 -06:00
Derek Collison
b7932fdd2f Added additional tests for requests across routes 2014-12-18 20:14:53 -08:00
Derek Collison
bfe88c335c test fixups for 1.3, add in test for leaked route Go routines 2014-07-24 16:01:28 -07:00
Derek Collison
3e86a2cbeb Added cluster restart test with queue subscribers 2014-07-23 17:39:15 -07:00
Derek Collison
e01bd2a6f1 go fmt fix 2013-12-12 14:39:51 -08:00
Derek Collison
6cbe515497 Clean up after ourselves 2013-12-12 14:09:40 -08:00
Derek Collison
c9fd57ad6b fix for race in test 2013-12-12 13:59:05 -08:00
Derek Collison
eb5c550f10 Fixed slice panic on MSG_ARG split buffer 2013-12-12 13:11:37 -08:00