Commit Graph

3051 Commits

Author SHA1 Message Date
Ivan Kozlovic
00eb20b293 Merge pull request #1533 from nats-io/silent_sub_loss_in_cluster
Adding unit test demonstrating silent subscription loss
2020-07-24 14:37:35 -06:00
Derek Collison
ad8d768d34 bumped beta version
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-24 11:25:59 -07:00
Derek Collison
ec34552a88 Merge pull request #1534 from nats-io/ratelimit
Add in push based consumer rate limits
2020-07-24 13:25:10 -05:00
Matthias Hanel
59af53c452 Adding unit test demonstrating silent subscription loss
This test uses is skipped for now

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-07-24 13:21:27 -04:00
Derek Collison
154d4303a9 Add in consumer rate limits
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-24 10:11:32 -07:00
Ivan Kozlovic
aa67270ea5 Merge pull request #1530 from nats-io/fix_1527
[FIXED] Queue subscriptions not able to receive system events.
2020-07-23 12:40:38 -06:00
Ivan Kozlovic
dbf962f958 [FIXED] Queue subscriptions not able to receive system events.
The issue was caused by the kind of connections being checked.

Resolves #1527

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-23 11:38:43 -06:00
Derek Collison
9514576b72 Merge pull request #1526 from nats-io/no-header-support-option
added 'no_header_support' config option mapping to NoHeaderSupport
2020-07-22 12:13:30 -05:00
Alberto Ricart
2047c791ea added option so clients can test if a server disables header support 2020-07-22 10:11:44 -05:00
Derek Collison
70769b1d2d Merge pull request #1524 from nats-io/jsfix
Fix for stream delete with many consumers
2020-07-22 09:55:45 -05:00
Derek Collison
48b2335cbf Fix for stream delete with many consumers - https://github.com/nats-io/jetstream/issues/260
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-22 07:35:38 -07:00
Ivan Kozlovic
449f7f15cb Merge pull request #1523 from nats-io/add_cmd_line_cluster_name
Added -cluster_name command line option
2020-07-21 16:45:21 -06:00
Ivan Kozlovic
0ce84a83c5 Added -cluster_name command line option
This is handy for client libraries that start the server as
external executable and pass command line arguments. Without
specifying the cluster name, routes can take time to establish
and cause some tests to fail.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-21 15:50:24 -06:00
Derek Collison
1d394fbd28 Merge pull request #1522 from nats-io/adr-ldm
adr describing new `ldm` field in the `INFO` protocol.
2020-07-20 17:45:53 -05:00
Alberto Ricart
d2c50be093 adr describing new ldm field in the INFO protocol. 2020-07-20 10:41:06 -05:00
Derek Collison
862dfcde0e Merge pull request #1521 from ripienaar/unlimited_accounts
ensure unlimited account limits are calculated correctly
2020-07-20 07:50:17 -05:00
R.I.Pienaar
5037f00b30 ensure unlimited account limits are calculated correctly
Previously unlimited accounts - ones who inherit server values - would
be unable to publish any messags at all

Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-07-20 10:46:34 +02:00
Ivan Kozlovic
4a4a36f9ec Merge pull request #1517 from nats-io/fix_1515
[FIXED] Handling of gossiped URLs
2020-07-16 12:56:02 -06:00
Ivan Kozlovic
b9764db478 Renamed gossipURLs type and moved its declaration to util.go
Also made the add/remove/getAsStringSlice receiver for this type.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-16 11:22:58 -06:00
Ivan Kozlovic
9b0967a5d1 [FIXED] Handling of gossiped URLs
If some servers in the cluster have the same connect URLs (due
to the use of client advertise), then it would be possible to
have a server sends the connect_urls INFO update to clients with
missing URLs.

Resolves #1515

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-15 17:39:12 -06:00
Derek Collison
8312f3fb6d Merge pull request #1512 from nats-io/eoupdate
More checks on duplicate window config, signal in PubAck if duplicate
2020-07-10 07:12:33 -07:00
Derek Collison
177ca51356 More checks on duplicate window config, signal in PubAck if duplicate
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-10 07:02:34 -07:00
Waldemar Quevedo
6ba1559598 Merge pull request #1510 from nats-io/leafnode-no-op-reload
Fix config reload when no changes for leafnode remotes
2020-07-09 19:46:51 -07:00
Ivan Kozlovic
29d5fdc483 Merge pull request #1511 from nats-io/no_responders_should_not_use_sendprotonow
Fixed no_responders use of sendProtoNow()
2020-07-09 18:22:07 -06:00
Ivan Kozlovic
4d495104de Fixed no_responders use of sendProtoNow()
The call sendProtoNow() should not normally be used (only when
setting up a connection when the writeloop is not yet started and
server needs to send something before being able to start the
writeLoop.

Instead, code should use enqueueProto(). For this particular
case though, use queueOutbound() directly and add to the
producer's pcd map.

Also fixed other places where we were using queueOutbound() +
flushSignal() which is what enqueueProto is doing.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-09 17:55:14 -06:00
Derek Collison
ad21074177 Merge pull request #1508 from nats-io/eo
Provide exactly once semantics
2020-07-09 16:27:56 -07:00
Derek Collison
2b577b5197 Recover dedupe in memory structures on stream recovery
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-09 16:13:20 -07:00
Waldemar Quevedo
edb611fad4 Fix config reload when no changes for leafnode remotes
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2020-07-09 14:33:08 -07:00
Derek Collison
ba9dd37595 Rename json field
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-09 08:41:32 -07:00
Derek Collison
e750af84c0 Redo for fast exit when key not found
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-08 17:42:16 -07:00
Derek Collison
b74c2eb2c4 Provide exactly once semantics
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-08 16:56:52 -07:00
Ivan Kozlovic
bfe4eb68b2 Merge pull request #1506 from nats-io/fix_1505
[FIXED] Connection name in log statement for some IPv6 addresses
2020-07-08 14:59:25 -06:00
Ivan Kozlovic
84a0229aa3 Merge pull request #1507 from nats-io/fix_duplicate_sub
[FIXED] Handling or real duplicate subscription
2020-07-08 14:40:56 -06:00
Ivan Kozlovic
4ea3f9c57e [FIXED] Handling or real duplicate subscription
That is, if the server receives "SUB foo 1" more than once from
the same client, we would register in the client map this subscription
only once, and add to the account's sublist only once, however we
would have updated shadow subscriptions and route/gateway maps for
each SUB protocol, which would result in inability to send unsubscribe
to routes when the client goes away or unsubscribes.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-08 14:19:32 -06:00
Ivan Kozlovic
2c8bf520d1 [FIXED] Connection name in log statement for some IPv6 addresses
If an IPv6 address contains some "%" characters, this was causing
the connection name in log statement to mess up the Sprintf formatting.
The solution is to escape those "%" characters.

Resolves #1505

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-08 10:17:14 -06:00
Derek Collison
735e06b9b9 Merge pull request #1503 from nats-io/jsbug
Pending timers could go negative, this is a fix for #1502
2020-07-07 05:38:21 -07:00
Ivan Kozlovic
5cf858e4e4 Merge pull request #1504 from nats-io/fix_accept_loop_bug
Fixed accept loops that could leave connections opened
2020-07-06 18:35:18 -06:00
Ivan Kozlovic
9288283d90 Fixed accept loops that could leave connections opened
This was discovered with the test TestLeafNodeWithGatewaysServerRestart
that was sometimes failing. Investigation showed that when cluster B
was shutdown, one of the server on A that had a connection from B
that just broke tried to reconnect (as part of reconnect retries of
implicit gateways) to a server in B that was in the process of shuting down.
The connection had been accepted but createGateway not called because
the server's running boolean had been set to false as part of the shutdown.
However, the connection was not closed so the server on A had a valid
connection to a dead server from cluster B. When the B cluster (now single
server) was restarted and a LeafNode connection connected to it, then
the gateway from B to A was created, that server on A did not create outbound
connection to that B server because it already had one (the zombie one).

So this PR strengthens the starting of accept loops and also make sure
that if a connection (all type of connections) is not accepted because
the server is shuting down, that connection is properly closed.

Since all accept loops had almost same code, made a generic function
that accept functions to call specific create connection functions.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-06 17:03:19 -06:00
Derek Collison
aecdca874f Pending timers could go negative, this is a fix for #1502
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-06 14:59:05 -07:00
Ivan Kozlovic
33deee8a64 Merge pull request #1501 from nats-io/fix_test
Fixed some flappers
2020-07-03 11:47:58 -06:00
Ivan Kozlovic
27540ee255 Fixed some flappers
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-03 11:30:48 -06:00
Ivan Kozlovic
774da7f021 Merge pull request #1499 from nats-io/fix_async_client_tests
Fixed async client tests
2020-07-01 16:11:36 -06:00
Ivan Kozlovic
342acb0fe7 Fixed async client tests
In some tests, async clients are used with a running server (which
was not original intent). This resulted in the client writeLoop
to be started twice.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-01 15:53:08 -06:00
Derek Collison
1004bd5cae version bump
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-01 08:13:24 -07:00
Derek Collison
ff8dfa8d35 Reordering for inbound processing
Signed-off-by: Derek Collison <derek@nats.io>
2020-07-01 07:33:34 -07:00
Derek Collison
5eefff53bb Merge pull request #1497 from nats-io/sc
Update write deadline, client processing and slow proxy
2020-07-01 05:54:51 -07:00
Derek Collison
439e090e0d Updates based on feedback
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-30 18:14:30 -07:00
Derek Collison
06ca580334 Update write deadline, client processing and slow proxy
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-30 16:41:01 -07:00
Derek Collison
a1ade271be Merge pull request #1496 from nats-io/lnfix
Track destination leafnode status
2020-06-26 11:25:40 -07:00
Derek Collison
2a799e7f5f Track destination leafnode status
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-26 11:18:11 -07:00