Commit Graph

7203 Commits

Author SHA1 Message Date
Byron Ruth
f3dac91d2a Prepare v2.9.17 release
Include fix with GoReleaser for nightly.

Signed-off-by: Byron Ruth <byron@nats.io>
2023-05-18 13:57:40 -04:00
Derek Collison
25d9762ce2 [IMPROVED] Make health checks more consistent with stream health checks. (#4180)
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-18 09:18:12 -07:00
Derek Collison
7e3f3f4908 Make health checks more consistent with stream health checks.
Check for closed state on leader change for consumers.

Signed-off-by: Derek Collison <derek@nats.io>
2023-05-18 08:18:53 -07:00
Derek Collison
f63d63fbce [IMPROVED] Stepdown on catchup request for something newer than our state (#4179)
When we receive a catchup request for an item beyond our current state,
we should stepdown.

Signed-off-by: Derek Collison <derek@nats.io>
2023-05-17 19:25:05 -07:00
Derek Collison
4fbc0ee563 Update to Go 1.19.9 (#4178) 2023-05-17 18:01:58 -07:00
Byron Ruth
3a152a0e40 Update to Go 1.19.9
Signed-off-by: Byron Ruth <byron@nats.io>
2023-05-17 20:57:10 -04:00
Derek Collison
8e825001d2 When we receive a catchup request for an item beyond our current state, we should stepdown.
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-17 17:30:35 -07:00
Derek Collison
7dfe5e528e Bump to 2.9.17-RC.3
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-17 16:46:10 -07:00
Derek Collison
93eaf8c814 Add workflow for stale issues (#4161)
This adds a workflow to mark issues and PRs stale after the configured
period of time, followed by closing the issue/PR after a subsequent
period of time if there was no additional activity.

The `debug-only` option is so currently, so even when merged, it will do
a dry-run and not perform any actions. Once we inspect the initial logs
of the effect of an initial run (impacting existing issues), we can
adjust accordingly and then follow-up with making it active.

For the debug logs to be enabled, we do need to add a repository secret
named `ACTIONS_STEP_DEBUG` with a value set to `true` per [this
instruction](https://github.com/marketplace/actions/close-stale-issues#debugging).
2023-05-17 16:45:17 -07:00
Derek Collison
94457e2d55 [IMPROVED] Reset logic for streams (#4177)
When we detect conditions to reset streams, make sure we properly clean
up old NRG nodes etc.

Signed-off-by: Derek Collison <derek@nats.io>
2023-05-17 16:45:00 -07:00
Derek Collison
b856bba285 [FIXED] Avoid deadlock with usage lock for an account during checkAndSyncUsage() (#4176)
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-17 16:44:44 -07:00
Derek Collison
a8d7d3886e Make sure to delete the stream assignment node here
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-17 16:19:39 -07:00
Derek Collison
44a5875968 Avoimd deadlock with usage lock for an account during checkAndSyncUsage().
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-17 16:05:46 -07:00
Derek Collison
f3553791b1 Updates to stream reset logic.
1. When catching up do not try forever and if needed reset cluster state.
2. In checking if a stream is healthy check for node drift.
3. When restarting a stream make sure the current node is stopped.

Signed-off-by: Derek Collison <derek@nats.io>
2023-05-17 13:14:33 -07:00
Derek Collison
5db57fb053 Bump to 2.9.17-RC.2
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-16 14:02:29 -07:00
Derek Collison
ac68a19530 [IMPROVED] Restart consumer behavior during healthz() checks. (#4172)
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-16 13:58:47 -07:00
Derek Collison
a06e1c9b43 Make sure to also stop nodes when dealing with consumer after stream restart
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-16 13:16:47 -07:00
Derek Collison
3752a6c500 Make sure to stop the node on a consumer restart if still running
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-16 12:49:46 -07:00
Derek Collison
734895ae47 Fix test flapper
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-16 12:20:18 -07:00
Derek Collison
87f17fcff4 [FIXED] Avoid stale KV reads on server restart for replicated KV stores. (#4171)
Make sure to wait properly until we believe we are caught up to enable
direct gets on followers.

Signed-off-by: Derek Collison <derek@nats.io>

Resolves #4162
2023-05-16 11:29:37 -07:00
Derek Collison
b0340ce598 Make sure to wait properly until we believe we are caught up to enable direct gets.
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-16 11:02:06 -07:00
Derek Collison
4feb7b95a3 CHANGED - typo err (#4169)
Resolves # typo err

### Changes proposed in this pull request:

 - jetstream_api.go typo err
 - accounts.go typo err
 
/cc @nats-io/core
2023-05-16 07:20:19 -07:00
Savion
cd192f0e03 CHANGED - typo err 2023-05-16 16:41:52 +08:00
Derek Collison
bca7b4ea44 Bump to 2.9.17-RC.1
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-15 15:45:48 -07:00
Derek Collison
9434110c05 [FIXED] Additional fix for #3734. (#4166)
When the first block was truncated and missing any index info we would
not properly rebuild the state.

Signed-off-by: Derek Collison <derek@nats.io>

Resolves #3734
2023-05-15 15:40:12 -07:00
Waldemar Quevedo
ee38f8bbc5 monitor: change account detail info back to utc when served (#4163)
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-05-15 15:33:57 -07:00
Derek Collison
3602ff5146 Additional fix for #3734.
When the first block was truncated and missing any index info we would not properly rebuild the state.

Signed-off-by: Derek Collison <derek@nats.io>
2023-05-15 15:30:55 -07:00
Derek Collison
584ea85d75 [FIXED] Protect against out of bounds access on usage updates. (#4164)
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-15 14:58:05 -07:00
Derek Collison
832df1cdba Protect against out of bounds access on usage updates.
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-15 14:38:26 -07:00
Derek Collison
fe71ef524c [FIXED] Service imports reporting for Accountz() when mapping to local subjects. (#4158)
Signed-off-by: Derek Collison <derek@nats.io>

Resolves #4144
2023-05-15 14:04:57 -07:00
Derek Collison
ea75beaeb1 [FIXED] Track all remote servers in a NATS system with different domains. (#4159)
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-15 13:47:06 -07:00
Byron Ruth
f764853e00 Disable auto-closing, increase stale threshold
Signed-off-by: Byron Ruth <byron@nats.io>
2023-05-15 09:14:31 -04:00
Waldemar Quevedo
3c4ed549a5 resolver: improve signaling for missing account lookups (#4151)
When using the nats account resolver and a JWT is not found, the client could
often get an i/o timeout error due to not receiving a timely response
before the account resolver fetch request times out. Now instead
of waiting for the fetch request to timeout, a resolver without JWTs
will notify as well that it could not find a matching JWT, waiting for a
response from all active servers.

Also included in this PR is some cleanup to the logs emitted by the
resolver.

Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-05-14 11:10:25 -07:00
Byron Ruth
7e9a427d13 Fix workflow structure
Signed-off-by: Byron Ruth <byron@nats.io>
2023-05-14 13:19:30 -04:00
Byron Ruth
92c70712de Add workflow for stale issues
Signed-off-by: Byron Ruth <byron@nats.io>
2023-05-14 13:06:01 -04:00
Derek Collison
75d274a636 If a NATS system has multiple domains make sure to process those during a remote update before bailing.
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-13 18:36:42 -07:00
Derek Collison
d293af1da6 Fix to service imports reporting for Accountz() when import subject is mapped into different local subject.
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-13 12:57:05 -07:00
Derek Collison
a982bbcb73 [FIXED] Allow sorting by rtt for connz. (#4157)
Signed-off-by: Derek Collison <derek@nats.io>

Resolves #4150
2023-05-12 20:47:17 -07:00
Derek Collison
421775a32a Fix to allow sorting by rtt for connz.
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-12 20:22:07 -07:00
Derek Collison
c31e710d9e [FIXED] Allow user filtering on connz for other user types like nkeys etc. (#4156)
Signed-off-by: Derek Collison <derek@nats.io>
 
Resolves #4149
2023-05-12 15:38:46 -07:00
Derek Collison
7f17e07d66 Filter by user at the end for closed connections
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-12 15:24:42 -07:00
Derek Collison
0c13f174c0 Fixed cap mistake in comment
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-12 15:07:00 -07:00
Derek Collison
c5eb46cb06 Make sure closed clients captures all user types and works with user filtering as well
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-12 15:05:40 -07:00
Derek Collison
90d1063674 Fix for #4149 to allow proper user filtering on connz for other user types.
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-12 14:19:37 -07:00
Derek Collison
fc64c6119d Use monotonic time for measuring time internally (#4154)
- [x] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [x] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
 - [x] Build is green in Travis CI
- [x] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)
2023-05-12 12:37:16 -07:00
Waldemar Quevedo
286a1632ca Use monotonic time for measuring time internally
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-05-12 08:27:46 -07:00
Derek Collison
bdb0ba9ae5 [FIXED] Can't scale up some older streams (#4146)
For some older R1 streams created by previous servers we could have no
cluster for the stream assignment group which would prevent scale up
with newer servers.

This will inherit cluster if detected as absent from the placement tags
or client cluster designation.

Signed-off-by: Derek Collison <derek@nats.io>
2023-05-10 21:42:59 -07:00
Derek Collison
5e029d08d5 For older R1 streams created by previous servers we could have no cluster for the stream assignment group which would prevent scale up with newer servers.
This will inherit cluster if detected from placement tags or client cluster designation.

Signed-off-by: Derek Collison <derek@nats.io>
2023-05-10 17:59:28 -07:00
Derek Collison
2f2498ab7e Bump to 2.9.17-beta.7
Signed-off-by: Derek Collison <derek@nats.io>
2023-05-10 15:32:45 -07:00
Derek Collison
81bf92b2c6 [IMPROVED] Leadership transfer (#4145)
When doing leadership transfer stepdown as soon as we know we have sent
the EntryLeaderTransfer entry.

Delaying could allow something to be sent from the old leader which
would cause the new leader to bail on being a candidate even though it
would have gotten all the votes.

Signed-off-by: Derek Collison <derek@nats.io>
2023-05-10 15:30:38 -07:00