Commit Graph

3799 Commits

Author SHA1 Message Date
Ivan Kozlovic
646b3850bf Bump version to 2.8.2-beta
Following recommendations to push to a new version as soon as
we release.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-21 15:50:08 -06:00
Ivan Kozlovic
dcfd52413e Release v2.8.1
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-21 14:28:12 -06:00
Ivan Kozlovic
99f1bdf1d8 Bump version to 2.8.1-beta.1
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-21 11:28:24 -06:00
Ivan Kozlovic
363849bf3a [FIXED] JetStream: Mirrors would fail to be recovered
This is a continuation of PR #3060, but extends to clustering.

Verified with manual test that a mirror created with v2.7.4 has
the duplicates window set and on restart with main would still
complain about use of dedup in cluster mode. The mirror stream
was recovered but showing as R1.
With this fix, a restart of the cluster - with existing data -
will properly recover the stream as an R3 and messages that
were published while in a bad state are synchronized.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Signed-off-by: Matthias Hanel mh@synadia.com
2022-04-21 10:59:23 -06:00
Ivan Kozlovic
b9463b322f [FIXED] JetStream: stream mirror issues in mixed mode clusters
Similar to PR #3061

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-20 23:21:15 -06:00
Ivan Kozlovic
df61a335c7 Merge pull request #3061 from nats-io/js_fix_stream_source
[FIXED] JetStream: stream sources issue in mixed mode clusters
2022-04-20 23:20:41 -06:00
Ivan Kozlovic
9975a38c6e [FIXED] JetStream: stream sources issue in mixed mode clusters
The main issue was that in mixed-mode, the interest through gateway
may still be in optimistic mode, which when creating the source
consumer would start delivery before we had a chance to setup
the subscription to receive those messages.

The approach is to create the subscription prior to sending
the consumer create request. Also refactored a bit the code in
the hope to make the retries a bit more bullet proof.

We may also look at making sure that gateways are switched to
interest-mode when detecting a mixed-mode setup.

Also fixed a defect that could cause a source to be canceled
when updating a stream.

Resovles #2801

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-20 21:02:35 -06:00
Matthias Hanel
254c970876 Fix subject renaming for leaf connections and queue subs (#3062)
* [fix] on queue sub, a consumers  delivery subject, was not changed

to the original publish subject the stream received
the code added is a copy of what regular subs do

* [fixed] subject renaming for leaf node connections as well

also updated multi server test to test for queue and non queue scenarios

Signed-off-by: Matthias Hanel <mh@synadia.com>
2022-04-20 19:23:21 -04:00
Matthias Hanel
9db2e91403 Fixes issue on restart where mirror config was invalid (#3060)
This issue was introduced by a bug that assigned a de dupe default value
do mirrors.
This is an invalid config that used to be checked on stream create.
Subsequently this logic was moved and then got executed on startup.
Ending up checking mirrors that got the bad default assigned.
Fix is to clear de dupe window for mirrors

Signed-off-by: Matthias Hanel <mh@synadia.com>
2022-04-20 13:58:30 -04:00
Matthias Hanel
ff5d60973d introducing max_age/dupe_window minimum value of 100ms. (#3056)
Signed-off-by: Matthias Hanel <mh@synadia.com>
2022-04-20 13:58:19 -04:00
Derek Collison
e2ab9d7cb4 Merge pull request #3059 from nats-io/move-fix
Polling too quickly could make migration fail.
2022-04-20 09:36:09 -07:00
Derek Collison
9f9732ad97 When we polled too quickly on migration we could check before catchup logic had even kicked in.
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-20 16:56:18 +01:00
Ivan Kozlovic
730d8921e4 [FIXED] LeafNode: propagation interest issue after a config reload
When a configuration reload is done, the account's leaf node connections
were not transfered to the new instance of the account, causing the
interest to not be propagated until a leafnode reconnect or a server
restart.

Resolves #3009

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-20 08:03:34 -06:00
Ivan Kozlovic
69ea1ab5f4 Bump version
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-18 16:36:33 -06:00
Ivan Kozlovic
38bbc6cb72 Release v2.8.0
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-18 16:21:31 -06:00
Ivan Kozlovic
ddd31b1988 Merge pull request #3022 from LaurensVergote/Windows
Allow nats-server to run as system user on Windows
2022-04-18 14:33:32 -06:00
Ivan Kozlovic
ca63b206f1 Bump version to 2.8.0-beta.23
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-18 14:04:42 -06:00
Ivan Kozlovic
6d71937ba7 Merge pull request #3053 from nats-io/js_add_file_names
[IMPROVED] JetStream: add file names for invalid checksums
2022-04-18 14:00:15 -06:00
xieyuschen
322115be31 [fixed] On config reload js got disabled, when previously set via command line arg
fixes #3003
2022-04-18 15:58:10 -04:00
Ivan Kozlovic
af1a80d7c4 Merge pull request #3047 from nats-io/move-back
If we moved a stream back to a cluster we were once at, the stream would be empty.
2022-04-18 13:46:05 -06:00
Ivan Kozlovic
2659b30113 [IMPROVED] JetStream: add file names for invalid checksums
On restart, we report when we find error in checksums, but we
did not report the name of the file.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-18 13:35:08 -06:00
Ivan Kozlovic
1178b4ced7 Merge pull request #3052 from nats-io/js_sources_issues
[FIXED] JetStream: some stream SOURCE issues
2022-04-18 13:15:52 -06:00
Ivan Kozlovic
a78ccdcb2f [FIXED] JetStream: some stream SOURCE issues
- Possibly missing some early messages from the sourced stream
- In some cancel situations, the processing of sourced messages
would not longer work

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-18 12:42:16 -06:00
Derek Collison
656a9534a5 Bump flow control window back up.
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-18 05:33:20 -07:00
Matthias Hanel
79b4374d01 [Fixed] limits enforcement issues (#3046)
* [Fixed] limits enforcement issues

stream create had checks that stream restore did not have.
Moved code into commonly used function checkStreamCfg.
Also introduced (cluster/non clustered) StreamLimitsCheck functions to
perform checks specific to clustered /non clustered data structures.

Checking for valid stream config and limits/reservations before
receiving all the data. Now fails the request right away.

Added a jetstream limit "max_request_batch" to limit fetch batch size

Shortened max name length from 256 to 255, more common file name limit

Added check for loop in cyclic source stream configurations

features related to limits

Signed-off-by: Matthias Hanel <mh@synadia.com>
2022-04-18 01:53:48 -04:00
Derek Collison
b3fe3037c0 Bump to version 2.8.0-beta.22
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-17 21:08:50 -07:00
Derek Collison
19392ceebb If we moved a stream back to a cluster we were once at, the stream would appear to have no messages.
The old raft node assignment would prevent proper catchup.

Signed-off-by: Derek Collison <derek@nats.io>
2022-04-17 20:36:18 -07:00
Ivan Kozlovic
fd5cbdc940 Merge pull request #3045 from nats-io/js_cons_timers_cleanup
Cleanup timers on consumer leader change
2022-04-16 14:19:40 -06:00
Ivan Kozlovic
eb4856e4a7 Cleanup timers on consumer leader change
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-16 13:37:46 -06:00
Matthias Hanel
7752a5becc Fixed mixed mode server without JS dropping js export on jwt update (#3044)
* Fixed mixed mode server without JS dropping JS export on jwt update

Signed-off-by: Matthias Hanel <mh@synadia.com>
2022-04-16 15:09:36 -04:00
Derek Collison
ad1ced63e6 Bump to 2.8.0-beta.20
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-16 12:07:12 -07:00
Derek Collison
4aaea8e4c4 Improvements to move semantics.
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-16 07:55:05 -07:00
Derek Collison
55f8982e33 Fix flapping test
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-16 05:08:12 -07:00
Ivan Kozlovic
c25b08a178 Change "server limit" to "system limit"
Updated tests accordingly.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-15 18:38:42 -06:00
Ivan Kozlovic
fc873c6f2f Return limit in consumer max_ack_pending limit exceeded
- Updated tests that were checking for the error to include the limit
- Moved some tests above the benchmark ones

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-15 18:23:25 -06:00
Ivan Kozlovic
b9ed54b68f Bump to 2.8.0-beta.19
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-15 14:40:08 -06:00
Derek Collison
c9cb27228e Merge pull request #3041 from nats-io/mirror-move
Raft improvements
2022-04-15 13:38:53 -07:00
Derek Collison
d5ed5b1d92 fix
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-15 13:38:12 -07:00
Derek Collison
2a8b123706 Don't quickly declare lost quorum after scale up
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-15 13:28:34 -07:00
Derek Collison
3d9fdff315 Protect against no cluster
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-15 13:24:55 -07:00
Ivan Kozlovic
aa23a91938 Fix test that should have been fixed following FC tweak
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-15 13:24:55 -07:00
Ivan Kozlovic
114987f9ea Add catchup messages limit that was removed
Need to also limit the number of outstanding messages during a
catchup. It was removed in PR #3029

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-15 14:06:41 -06:00
Derek Collison
10c877d942 Make sure if we recreate something after deleting that we do not wipe valid state
Signed-off-by: Derek Collison <derek@nats.io>
2022-04-15 12:22:10 -07:00
Derek Collison
12730af5c2 Make sure mirror re-syncs after origin is moved.
Speed up mirror and sources heartbeats.

Signed-off-by: Derek Collison <derek@nats.io>
2022-04-15 07:01:55 -07:00
Ivan Kozlovic
a6b62f61a7 Fix test that should have been fixed following FC tweak
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-14 18:06:25 -06:00
Ivan Kozlovic
0e841d4acf Tweak ordered consumer flow control and bump to beta.18
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-14 17:43:43 -06:00
Ivan Kozlovic
09609a4d63 Bump to 2.8.0-beta.17
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-14 11:28:40 -06:00
Ivan Kozlovic
4e7c72ab33 Update based on code review
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-14 11:00:33 -06:00
Ivan Kozlovic
bd61d51a1c [IMPROVED] JetStream: reduce unnecessary leader election
- Wait of some sort of routing to be in place before starting
the raft run loop
- Remove use of lock in apiDispatch that was not necessary but
could have cause a route to block, causing memory growth, etc..

Unrelated rename of some tests so that they start with TestJetStream
and TestJetStreamCluster for cluster tests, fixed some flappers
and ensure that tests that change RAFT timeouts put them back
to default values on exit.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-14 10:47:14 -06:00
Derek Collison
9748925f13 Improvements to stream and consumer move.
During elected stepdown and transfer allow the new leader to take over before we stepdown.
We could receive a leader change, so make sure to also check migration state.

Signed-off-by: Derek Collison <derek@nats.io>
2022-04-14 07:27:29 -07:00