4373 Commits

Author SHA1 Message Date
Ivan Kozlovic
a5f3aabb13 Merge pull request #2155 from nats-io/release_2_2_2
Release v2.2.2
v2.2.2
2021-04-22 11:48:41 -06:00
Ivan Kozlovic
38dcc79b3b Release v2.2.2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-04-22 11:14:09 -06:00
Ivan Kozlovic
796eb8b12f Merge pull request #2152 from nats-io/close-tempfiles
close temp files, fix path print
2021-04-22 11:12:53 -06:00
scottf
486df98373 close tempfiles, fix path print 2021-04-22 12:47:21 -04:00
Ivan Kozlovic
96546040a3 Merge pull request #2151 from nats-io/fix_2126
[IMPROVED] MQTT error message when client connects with websocket
2021-04-22 09:27:43 -06:00
Derek Collison
b0292e40d2 Merge pull request #2149 from nats-io/pending_race
Do not persist or snapshot consumer state after a restore.
2021-04-22 08:22:14 -07:00
Ivan Kozlovic
d0fd62c83b [IMPROVED] MQTT error message when client connects with websocket
Websocket is currently not supported for MQTT clients. When a
client tries to connect with websocket protocol to the MQTT port,
the error message: `mid:9 - not connected` would be logged, which
is not really telling.

The server will now guess if the connection was websocket and report
a more appropriate error message, such as:
```
invalid connection, websocket currently not supported
```

Resolves #2126

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-04-22 09:03:47 -06:00
Derek Collison
2ac05785c3 Do not persist or snapshot consumer state after a restore.
This can lead to a data race and is not needed after being applied.

Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 18:50:38 -07:00
Matthias Hanel
eb3af67031 Delaying stream/consumer error response when there is no contact to meta
this gives a stream/consumer leader time to respond first

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-04-21 20:24:43 -04:00
Derek Collison
f2d3f5fb81 Merge pull request #2147 from nats-io/race
Fix race
2021-04-21 16:26:42 -07:00
Derek Collison
c9c70dea33 Fix race
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 16:17:58 -07:00
Derek Collison
3418847881 Merge pull request #2146 from nats-io/chblock
Make sure to not have the raft layer block on apply channel on exit.
2021-04-21 15:58:50 -07:00
Derek Collison
2ddb95867e Merge pull request #2145 from nats-io/overlap
Check for overlapping subjects on stream update.
2021-04-21 15:55:31 -07:00
Derek Collison
0678e649d3 Make sure to not have the raft layer block on apply channel on exit.
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 15:52:54 -07:00
Derek Collison
50fabe261d Check for overlapping subjects on stream update.
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 15:38:38 -07:00
Waldemar Quevedo
a48a392516 Merge pull request #2132 from wallyqs/oor-data-race
Fix for data race when disabling JS running out of resources
2021-04-21 14:54:45 -07:00
Waldemar Quevedo
c9ab7ce8a1 Fix for data race when disabling JS running out of resources
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2021-04-21 14:26:52 -07:00
Ivan Kozlovic
ea21e86996 Merge pull request #2136 from nats-io/fix_leafnode_puballowed_race
[FIXED] Possible panic due to concurrent access to unlocked map
2021-04-21 13:54:32 -06:00
Derek Collison
2a047bef0b Merge pull request #2143 from nats-io/ccons
Make sure to return no consumer error if we are still waiting on a leader.
2021-04-21 12:46:59 -07:00
Derek Collison
3788822f82 Updates based on feedback
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 12:41:11 -07:00
Derek Collison
9f1bc5882c Make sure to return no consumer if we are still waiting on a leader to be elected.
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 12:13:10 -07:00
Derek Collison
3d928c847a Merge pull request #2140 from nats-io/econsumer
Make sure that ephemerals are cleaned up across gateways.
2021-04-21 09:41:50 -07:00
Derek Collison
a301d3a892 Check direct consumers directly, stream state back to previous behavior
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 09:40:04 -07:00
Derek Collison
cc776302a0 2.2.2-beta.11
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 08:48:49 -07:00
Derek Collison
b5521053e6 Make sure to clean up ephemerals across a Gateway.
Also report direct consumers in num consumers in stream info.

Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 08:47:55 -07:00
Derek Collison
a9607573b3 Merge pull request #2139 from nats-io/cfix
Fix for consumer on restore being deleted
2021-04-21 06:58:34 -07:00
Derek Collison
d31041ecd9 2.2.2-beta.10
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 06:57:07 -07:00
Derek Collison
a181238cf0 Fix for consumer on restore being deleted
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-21 06:54:54 -07:00
Ivan Kozlovic
32f1a58b09 Move cas in prunePubPermsCache() itself and clear with atomic.Store
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-04-20 21:18:13 -06:00
Ivan Kozlovic
1014041be3 [FIXED] Possible panic due to concurrent access to unlocked map
This could happen when a leafnode has permissions set and another
connection (client, etc..) is about to assign a message to the
leafnode while the leafnode itself is receiving messages and they
both check permissions at the same time.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-04-20 21:18:13 -06:00
Derek Collison
a3f66508dd Merge pull request #2138 from nats-io/ports
Use lower ports to not collide with -1s
2021-04-20 20:15:24 -07:00
Derek Collison
cef52cda9a Merge pull request #2137 from nats-io/csubs
Concurrent multiple durable subscribers fix
2021-04-20 20:12:35 -07:00
Derek Collison
e31361e6a2 Use lower ports to not collide with -1s
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-20 20:10:29 -07:00
Derek Collison
518ff9be14 Concurrent multiple durable subscribers would cause unpredictable behaviors.
Upgraded to current Go client.

Signed-off-by: Derek Collison <derek@nats.io>
2021-04-20 19:50:24 -07:00
Derek Collison
7ac0ff6674 Merge pull request #2135 from nats-io/panic
Check that we have mirror still to not panic and deadlock/hang
2021-04-20 17:13:16 -07:00
Derek Collison
5707c1132c Move to dynamic ports
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-20 17:08:47 -07:00
Matthias Hanel
4d112af6c1 Fix account resolver lock ordering on shutdown
This is benign as the inversion was between start and stop.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-04-20 20:08:14 -04:00
Derek Collison
ef7a811a71 Check that we have mirror still to not panic and deadlock/hang
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-20 16:41:41 -07:00
Derek Collison
902b9dec12 Merge pull request #2131 from nats-io/updates
General Updates and Stability Improvements
2021-04-20 13:52:39 -07:00
Derek Collison
5aa3dd7761 Put back direct consumer subject prefix
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-20 13:35:48 -07:00
Ivan Kozlovic
148a157abe Merge pull request #2133 from nats-io/not-ready-conns2
Return not ready for connection reason
2021-04-20 13:50:49 -06:00
Derek Collison
0a3e54c88a Fix subscription leaks for mirrors and sources for streams as well as flow control subjects for consumers.
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-20 12:13:07 -07:00
Jaime Piña
e12181cb83 Return not ready for connection reason
Currently, we use ReadyForConnections in server tests to wait for the
server to be ready. However, when this fails we don't get a clue about
why it failed.

This change adds a new unexported method called readyForConnections that
returns an error describing which check failed. The exported
ReadyForConnections version works exactly as before. The unexported
version gets used in internal tests only.
2021-04-20 11:45:08 -07:00
Ivan Kozlovic
9806146e0e Merge pull request #2127 from nats-io/stream-op-acc
Declare required JetStream resources in test
2021-04-20 09:00:23 -06:00
Derek Collison
fe3537d429 Check err
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-20 07:08:10 -07:00
Derek Collison
1d7522581f 2.2.2-beta.8
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-20 06:06:39 -07:00
Derek Collison
2da264c1ec Randomize cluster and gateway ports
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-19 20:24:25 -07:00
Derek Collison
68ddd519d2 Process upstream missing messages for mirrors better.
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-19 20:15:21 -07:00
Derek Collison
820c76d3c8 Fix flapper
Signed-off-by: Derek Collison <derek@nats.io>
2021-04-19 11:43:43 -07:00
Matthias Hanel
b73be52862 [fixed] only become observer if the leaf config has raft not restricted (#2125)
If a subject in the system accounts leafnode deny_imports matches $NRG.>
then jetstream is explicitly disconnected and the server can become
leader.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-04-19 13:10:49 -04:00