Derek Collison
0cc7302be9
A stream name is tied to its identity and can not be changed on a restore.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-09 12:38:45 -08:00
Derek Collison
c13a84cf44
Fixed a bug that would calculate the first sequence of a filteredPending incorrectly.
...
Also added in more optimized version to select the first matching message in a message block for LoadNextMsg.
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-08 13:29:38 -08:00
Derek Collison
d50febeeff
Improved sparse consumers replay time.
...
When a stream has multiple subjects and a consumer filters the stream to a small and spread out list of messages the logic would do a linear scan looking for the next message for the filtered consumer.
This CL allows the store layer to utilize the per subject info to improve the times.
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-07 17:26:32 -08:00
Derek Collison
d71bb63e1b
Merge pull request #2847 from nats-io/fc_stall
...
Fixed flow control stall under specific conditions of message size.
2022-02-07 09:28:17 -08:00
Derek Collison
55b7f11c9a
Fixed flow control stall under specific conditions of message size.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-05 20:15:48 -08:00
Ivan Kozlovic
6d92051696
Release v2.7.2
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2022-02-04 14:49:39 -07:00
Derek Collison
a0a2e32185
Remove dynamic account behaviors.
...
We used these in tests and for experimenting with sandboxed environments like the demo network.
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-04 13:32:18 -08:00
Derek Collison
5da0453964
Add in NumSubjects to StreamInfo
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-02 08:51:13 -08:00
Derek Collison
6a3cf0f71e
Added in ability to get number of subjects from StreamInfo, and optionally details per subject on how many messages each subject has.
...
This can also be filtered, meaning you can filter out the subjects when asking for details.
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-02 08:51:13 -08:00
Derek Collison
12f5ea3655
When a consumer had not filtered subject and was attached to a interest policy retention stream we could incorrectly drop messages.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-01 14:21:05 -08:00
Derek Collison
6b5332249b
This test was using fetch and failing if the complete batch was not filled.
...
This has nothing to do with the test, we just want to make sure the leader steps down and there were no low level errors on the fetch.
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-01 13:34:00 -08:00
Derek Collison
8fce45dfa7
Under certain scenarios the pending for a consumer could appear to get stuck.
...
Under the covers we were calculating pending per msg block incorrectly when a single message existed beyond the requested sequence.
Signed-off-by: Derek Collison <derek@nats.io >
2022-02-01 12:17:08 -08:00
Ivan Kozlovic
30c431a9a3
[FIXED] JetStream: BackOff redeliveries would always use first in list
...
If the consumer's sequence was not the same than the stream's sequence,
then the redelivery would always use the first duration from the
BackOff list.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2022-01-31 17:44:08 -07:00
Derek Collison
0d158728d1
Merge pull request #2824 from nats-io/fix-nodeinfo
...
Store JetStream Config in node info map
2022-01-31 13:58:12 -08:00
Derek Collison
fa814f7cee
Fixed behavior for when MaxMsgsPerSubject is set and DiscardNew is also set.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-31 08:36:37 -08:00
Derek Collison
6b690bd5b6
Bump to 2.7.2-beta
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-30 15:24:07 -08:00
Derek Collison
8815072e34
Fix flapping test
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-30 14:54:24 -08:00
Derek Collison
b38ced51b2
A true no wait pull request was not considering redeliveries.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-30 11:52:35 -08:00
Derek Collison
275d42628b
Fix for #2828 . The original design of the consumer and the subsequent store did not allow updates.
...
Now that we do, we need to store the new config into our storage layer.
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-30 09:45:05 -08:00
Derek Collison
a57bd96def
Updating a push consumer to be pull would succeed but cause a panic if used.
...
This disallows that upgrade. We had a check in place for pull to push, but not the reverse.
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-28 13:11:58 -08:00
Jaime Piña
ae8eedb88e
Store JetStream Config in node info map
2022-01-27 14:46:41 -08:00
Ivan Kozlovic
37ff12cc7a
Release v2.7.1
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2022-01-25 13:54:12 -07:00
Ivan Kozlovic
7f81f2d4c6
Merge pull request #2816 from nats-io/revocation-issue-442
...
Fix jwt based user/activation token revocation and granularity
2022-01-25 13:42:14 -07:00
Matthias Hanel
c5cc81bc1d
Fix collectRevocations
...
Signed-off-by: Matthias Hanel <mh@synadia.com >
2022-01-25 15:02:47 -05:00
Matthias Hanel
274ec6db65
incorporate comments
...
Signed-off-by: Matthias Hanel <mh@synadia.com >
2022-01-25 14:53:03 -05:00
Matthias Hanel
fa12d096cd
Fix jwt based user/activation token revocation and revocation granularity
...
user and activation token did not honor the jwt value for all * on
connect.
activation token where not re evaluated when the export revoked a key.
In part this is a consistency measure so servers that already have an
account and servers that don't behave the same way.
in jwt activation token revocations are stored per export.
The server stored them per account, thus effectively merging
revocations. Now they are stored per export inside the server too.
fixes nats-io/nsc/issues/442
Signed-off-by: Matthias Hanel <mh@synadia.com >
2022-01-25 13:48:12 -05:00
Derek Collison
6486cd8fc8
Added in /healthz endpoint for health and liveness probes in environments like k8s.
...
Currently this code returns a 200 and { "status": "ok" } iff all configured ports are open
and if JetStream is configured and we have contact with the metaleader and the cluster and all streams are up to date.
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-24 19:30:10 -08:00
Derek Collison
6be9925127
Update config error
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-24 15:02:41 -08:00
Derek Collison
65b168aa8b
Updates based on feedback. MaxDeliver needs to be set properly now to be > len(BackOff) but if larger we will reuse last value in BackOff array.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-24 15:02:39 -08:00
Derek Collison
bd78b1a99b
Formal json version for NAK delay
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-24 15:01:52 -08:00
Derek Collison
d486c24199
Allow a consumer to be configured with BackOffs.
...
This allows a consumer to have exponential backoffs vs static AckWait and MaxDeliver.
When BackOff is set it will overridde AckWait to BackOff[0] and MaxDeliver will be len(BackOff)+1.
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-24 14:57:36 -08:00
Derek Collison
579bf336ad
Allow NAK to take a delay parameter to delay redelivery for a certain amount of time.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-24 14:57:28 -08:00
Derek Collison
89435d50b2
Merge pull request #2813 from nats-io/pull_consumer_2
...
Updates to Pull Consumers
2022-01-24 13:52:16 -08:00
Derek Collison
d332684322
Fixed data race and fuxed bug that we would not clear our waiting queue when a leader stepped down.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-24 13:01:25 -08:00
Derek Collison
35e8c57f06
Merge pull request #2814 from nats-io/neg_deleted
...
If we detect negative deleted, adjust to 0.
2022-01-24 11:52:58 -08:00
Ivan Kozlovic
dc3972304d
Merge pull request #2791 from mattstep/mattstep/replication-lag-metrics
...
[ADDED] Replication lag to stream monitoring
2022-01-24 12:07:06 -07:00
Derek Collison
d07000cde0
If we detect negative deleted, adjust
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-24 10:52:46 -08:00
Derek Collison
6fd41e5ea4
Updates based on review feedback
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-24 10:23:47 -08:00
Derek Collison
d962500827
Track reply subjects for pending pull requests across clustered consumers.
...
We will only send if all peers in our group are >= 2.7.1 and we will check for updates.
When a consumer follower takes over it will notify all pending requests that those requests are invalid now.
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-21 16:31:59 -08:00
Matt Stephenson
59cc0f0015
Add source and mirror info to stream monitoring
2022-01-21 12:44:42 -08:00
Derek Collison
ecd0d8eaff
Reset authSet state
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-21 11:03:19 -08:00
Derek Collison
ae43b24be4
Fixed #2810 . Do not warn about password for internally generated no auth user when just system account assigned to non-default.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-21 10:09:10 -08:00
Derek Collison
dcadf6643a
When no_auth_user is set, do not require a CONNECT proto.
...
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-21 09:41:45 -08:00
Derek Collison
7f572983ac
The 2.7 update broke the one-shot pull consumer fetch behavior due to change and a fix to a bug that allowed it to work before.
...
This change tries to lock down all expected behaviors, and now does out of order timeouts for requests.
Signed-off-by: Derek Collison <derek@nats.io >
2022-01-20 18:06:29 -08:00
Ivan Kozlovic
7aba8a8e9e
Bump version to v2.7.1-beta02
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2022-01-20 16:32:30 -07:00
Jaime Piña
c82b583d7a
Fix race condition in HTTP monitoring shutdown ( #2805 )
2022-01-20 15:29:17 -08:00
Ivan Kozlovic
f6acc9d28b
[FIXED] Possible deadlock
...
This is due to a re-entrant RLock(). It works sometimes, but if there
is a go routine requesting the write lock, then the second RLock()
will not be granted which will lead to a deadlock.
In summary: one should never make re-entrant RLock calls.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2022-01-20 13:53:52 -07:00
Ivan Kozlovic
c76bf81267
Fixed goreleaser ldflags
...
Since we moved to go modules, the path must include the `/v2`.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2022-01-13 19:02:41 -07:00
Ivan Kozlovic
f1d2f7c797
Release v2.7.0
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2022-01-13 17:11:02 -07:00
Ivan Kozlovic
70b1f5c950
Fix goreleaser script invocation - bump to rc2
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2022-01-13 16:58:19 -07:00