Commit Graph

4356 Commits

Author SHA1 Message Date
Ivan Kozlovic
f091004c0c Merge branch 'main' into dev 2022-11-03 16:52:54 -06:00
Ivan Kozlovic
c16ccd34c3 [FIXED] JetStream: Sources with OptStartTime gets redelivered
If start by time is before what we remember during recovery use that instead

Resolves #3559

Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-03 16:09:06 -06:00
Ivan Kozlovic
83c32429a8 Merge branch 'main' into dev 2022-11-03 14:34:58 -06:00
Derek Collison
c9fd776889 Merge pull request #3605 from nats-io/fix-3606
[FIXED] Notifying waiting pull consumers on consumer or parent stream deletion.
2022-11-03 13:05:47 -07:00
Derek Collison
72ff2edb5f Fix for #3603.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-03 12:46:41 -07:00
Ivan Kozlovic
2250f10093 Merge branch 'main' into dev 2022-11-03 13:01:35 -06:00
Ivan Kozlovic
91c84c03c2 [FIXED] LeafNode: possible duplicate messages in complex setup
This is specific to setup described [here](https://github.com/nats-io/nats-server/issues/3191#issuecomment-1296974382)
and does not require JetStream to be reproduced. The added test
reproduces the above setup but without JetStream enabled in
the accounts.

Each cluster has a leafnode for a given account to the other
cluster. The accounts import/export a subject. When a consumer
is connected to cluster "B" and the producer is on cluster "A"
there was a duplicate message. Due to shadow subscription caused
by the import/export rules, an additional subscription was
sent across the leafnode.

Resolves #3191

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-03 12:34:01 -06:00
Derek Collison
9fa7c1152b Merge branch 'main' into dev 2022-11-02 14:50:40 -07:00
Derek Collison
56919ebc97 On stream proposal failures we could accidentally warn on high stream lag.
We were not taking the clfs into account.

Signed-off-by: Derek Collison <derek@nats.io>
2022-11-02 14:40:31 -07:00
Ivan Kozlovic
1cc467a062 Merge branch 'main' into dev 2022-11-02 10:56:51 -06:00
Ivan Kozlovic
ab4470ccdc [FIXED] JetStream: possible panic on some rare cases
Very difficult to reproduce. Had to run TestJetStreamSuperClusterMoveCancel
in covermode=atomic on a slow machine to hit the condition where
the monitorConsumer go routine is started by RAFT node is nil,
which caused the warning message to produce the panic (since n is nil)

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-02 10:02:09 -06:00
Ivan Kozlovic
2321eafb0c Bump version to 2.9.6-beta as per release process
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-01 16:23:50 -06:00
Ivan Kozlovic
c16f60add5 Release v2.9.5
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-01 15:15:06 -06:00
Ivan Kozlovic
db4338f9de Merge branch 'main' into dev 2022-11-01 13:28:39 -06:00
Ivan Kozlovic
55e651c118 [FIXED] JetStream: processing of snapshot with expired messages
The issue that a "first sequence mismatch" during processing of
a snapshot was causing the state to be reset and caused a lot
of catchup from the follower. An attempt to fix that in PR #3567
caused an issue that was addressed in PR #3589. However, this was
then causing the follower to sometime never able to catchup or
took a very long time.
This PR - we believe - addresses the original and subsequent issues.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-01 12:58:45 -06:00
Derek Collison
1fa5e73177 Honor MaxMsgsPerSubject when a stream config is updated, including enforcing a lower limit.
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-31 17:25:20 -07:00
Ivan Kozlovic
fe588dc9ea Fixing a flapper
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-28 13:45:58 -06:00
Ivan Kozlovic
6d03d75d6d Merge pull request #3526 from MatthiasPetermann/main
[ADDED] Ability to build on NetBSD
2022-10-28 10:11:13 -06:00
Matthias Petermann
51c23ab145 [ADDED] Ability to build on NetBSD 2022-10-28 17:59:07 +02:00
Александр Петров
8eb430bfff add test 2022-10-28 20:16:40 +05:00
R.I.Pienaar
021e39419a Merge pull request #3580 from ripienaar/user_conn_deadline
adds the notion of a connection deadline to User
2022-10-28 16:42:59 +02:00
Александр Петров
19f63bee65 less optimistic cache hit rate 2022-10-28 11:36:46 +05:00
Ivan Kozlovic
3f0f3d7416 Bump version to 2.9.5-beta.1
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-27 19:15:01 -06:00
Derek Collison
121bf6ebb5 Move to past check for nil
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-27 17:30:07 -07:00
Ivan Kozlovic
346770973c Merge branch 'main' into dev
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-27 17:16:05 -06:00
Ivan Kozlovic
3a5f465115 Bump to 2.9.5-beta as per release process
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-27 17:15:00 -06:00
Ivan Kozlovic
f101e815fe Release v2.9.4
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-27 16:10:39 -06:00
Derek Collison
bd1df4bfd5 Bump to 2.9.4-RC.3
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-27 13:21:08 -07:00
Derek Collison
95d91b2869 Merge pull request #3585 from nats-io/leaf-perms
[FIXED] Existing subs would be sent to leafnodes even though they violated permissions.
2022-10-27 15:19:48 -05:00
Ivan Kozlovic
abcfe2e7ac Add the pending msgs/bytes on 409 Shutdown
This is related to PR #3572 and PR #3576

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-27 13:59:21 -06:00
Derek Collison
9c5ae6baef Existing subs would be sent to leafnodes even though pub perms should disallow.
If the LS+ gets through we debug that it was denied, but also fixed it so that does not happen.

Signed-off-by: Derek Collison <derek@nats.io>
2022-10-27 12:31:57 -07:00
Ivan Kozlovic
67655f5347 Merge branch 'main' into dev
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-27 10:36:36 -06:00
Derek Collison
24081ae78e Bump to 2.9.4-RC.2
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-27 09:19:22 -07:00
Derek Collison
d89992990b Merge pull request #3582 from nats-io/fix
Make sure to check for ss == nil
2022-10-27 11:07:11 -05:00
Derek Collison
8f6d55a878 Make sure to check for ss == nil
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-27 08:52:42 -07:00
Ivan Kozlovic
b3e0431959 [FIXED] allow_non_tls is lost after server reload
The server would reset its INFO's TLSRequired to the presence
of a TLS configuration without checking for the allow_non_tls
option.

Resolves #3581

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-27 09:49:44 -06:00
R.I.Pienaar
3bb473c67d adds the notion of a connection deadline to User
This will be used mainly by CustomClientAuthentication implementations
to indicate that the user connection should be disconnected at some
point in future - like when a certificate or token expires

Signed-off-by: R.I.Pienaar <rip@devco.net>
2022-10-27 12:57:30 +02:00
Derek Collison
8cc87c988f Bump to 2.9.4-RC.1
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-26 17:52:28 -07:00
Derek Collison
6128b83507 On abnormal server exit, for streams or KV with max msgs per subject set we could recover more than N msgs per subject.
This fix allows for recover of correct state on restart when index files are missing or not current.

Signed-off-by: Derek Collison <derek@nats.io>
2022-10-26 16:00:57 -07:00
Tomasz Pietrek
f0219e1d95 Merge pull request #3572 from nats-io/jarema/add-pending-info-to-request-timeout
Added pending messages/bytes info to request statuses and errors
2022-10-26 21:20:20 +02:00
Tomasz Pietrek
ef764598ee Add pending messages/bytes info to request errors and statuses
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
2022-10-26 20:02:11 +02:00
Ivan Kozlovic
5be49749e7 Merge branch 'main' into dev 2022-10-25 18:15:06 -06:00
Derek Collison
2241ad089e Make local error since non-fatal for now.
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-25 16:56:10 -07:00
Derek Collison
aa52c2fecf Added warning for high message lag into a clustered stream.
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-25 16:11:35 -07:00
Ivan Kozlovic
f74f54ccd7 Merge branch 'main' into dev 2022-10-25 16:42:13 -06:00
Derek Collison
db13766f18 Merge pull request #3576 from nats-io/signal-pull-consumers
Removed ephemeral consumer migration.
2022-10-25 17:35:35 -05:00
Derek Collison
f0afa49b9f Make sure to stop raft nodes on all monitor exits.
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-25 14:48:28 -07:00
Derek Collison
ff2cd1d7f9 Fixed test and bug that would override consumer replicas.
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-25 14:35:20 -07:00
Derek Collison
15dc72db50 Removed migration of ephemerals, added proper signaling for pul consumers pending requests.
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-25 14:35:20 -07:00
Ivan Kozlovic
3a7c2d7d5c Merge branch 'main' into dev 2022-10-25 12:49:01 -06:00