Commit Graph

4473 Commits

Author SHA1 Message Date
Derek Collison
ef32cba064 Merge branch 'main' into dev 2022-12-10 10:33:25 -05:00
Derek Collison
ea66d5f5bc Merge pull request #3702 from ripienaar/rate_limit_debug
Rate limit frequent debug log lines
2022-12-10 07:23:53 -08:00
Byron Ruth
566d1adfa7 Fix /healthz?js-enabled=true behavior
When js-enabled is set to true, the condition was only checked if
the `getJetStream()` call returned `nil`. However, if it non-nil,
all remaining checks were executed, including assessing the health
of the assets (streams and consumers).

This change addresses two issues:

- Switch to use `js.isEnabled()` which will check whether the value
  is nil OR `js.disabled = true` which can occur if the subsystem
  is temporarily disabled (insufficient resources).
- Correctly exit the check after the assertion and before meta and
  asset checks are performed.

In addition, the option has been renamed to `js-enabled-only` to align
with the `js-server-only` naming. The previous `js-enabled` name still
works, but is mapped to this new option. A warning is emitted noting
the previous option is deprecated.

Fix #3703

Signed-off-by: Byron Ruth <b@devel.io>
2022-12-10 07:34:32 -05:00
R.I.Pienaar
e234e773ab Rate limit frequent debug log lines
With the increase use of subject based limits not being able
to store due to limits exceeded happens frequently and makes
running the server in debug quite noisy, so we rate limit this
log line even in debug

Signed-off-by: R.I.Pienaar <rip@devco.net>
2022-12-09 11:53:52 +01:00
Derek Collison
16b3b8927c Merge branch 'main' into dev 2022-12-08 09:49:23 -08:00
Byron Ruth
4352a17080 Bump version to 2.9.10-dev
Signed-off-by: Byron Ruth <b@devel.io>
2022-12-08 12:47:42 -05:00
Byron Ruth
d8b9688567 Prepare for next release
Signed-off-by: Byron Ruth <b@devel.io>
2022-12-08 12:22:38 -05:00
Waldemar Quevedo
9bf0154465 Fix JWT tests JS store dir
This was causing longer than necessary startup times
since by default they would have been using the same
temporary directory and the extra account lookups
due to a previous JS run using different accounts.

Signed-off-by: Waldemar Quevedo <wally@nats.io>
2022-12-07 17:01:47 -08:00
Derek Collison
89b5f8319f Merge branch 'main' into dev 2022-12-07 13:01:06 -08:00
Derek Collison
8c6418ee45 Extensive test in support of issue #3191.
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-07 12:36:29 -08:00
Sandy Kellagher
7907950a54 Fix for #3682: do not delay PINGs for GATEWAY or solicited LEAF connections, to ensure failover of leaf node connections 2022-12-07 16:19:33 +00:00
Derek Collison
5baf90265c Bump to v2.9.9-RC.1
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-07 05:18:02 -08:00
Derek Collison
8a7a03f028 Merge branch 'main' into dev 2022-12-06 17:51:00 -08:00
Derek Collison
da2059a5f0 Merge pull request #3678 from nats-io/ut-replacepeer
tag policies not honored in reassignment after peer remove
2022-12-06 17:50:11 -08:00
Derek Collison
2f27438230 Make stream removal from a server consistent.
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-06 17:11:43 -08:00
Derek Collison
86aa3fffaa Merge branch 'main' into dev 2022-12-06 16:11:01 -08:00
Derek Collison
0a65d7960b Merge pull request #3690 from nats-io/upstream-jwt-acc-reenable
Fix to reenable JetStream for account when reenabled (dev → main)
2022-12-06 16:09:40 -08:00
Derek Collison
29b614a057 Fix flapping test
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-06 16:08:45 -08:00
Waldemar Quevedo
6df92f40dc Fix to reenable JetStream for account when reenabled
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2022-12-06 15:53:03 -08:00
Derek Collison
0881e4c370 Merge pull request #3687 from nats-io/jwt-acc-reenable
Fix to reenable JetStream for account when reactivated
2022-12-06 15:16:13 -08:00
Derek Collison
549b77ca2d Ensure that ephemeral consumers that are deleted on startup properly are removed from the system.
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-06 15:07:46 -08:00
Waldemar Quevedo
6789d216c9 Fix to reenable JetStream for account when reenabled
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2022-12-06 14:50:48 -08:00
Derek Collison
65d1b622cc Merge branch 'main' into dev 2022-12-06 14:27:50 -08:00
Derek Collison
894115b82b Fix for server panic when consumer state was not decoded correctly.
The bug was when a timestamp for the pending state was exactly -1 which could happen based on timing of the redlivered pending items which would set pending.Timestamp into the future potentially and the timing on the encodeConsumerState call.

Minor fixes to raft.

Signed-off-by: Derek Collison <derek@nats.io>
2022-12-06 14:16:20 -08:00
Todd Beets
bfd7d7f9ba improved test to remove false positive result 2022-12-06 12:48:53 -08:00
Todd Beets
3fdfb8a12f Merge branch 'main' into ut-replacepeer
# Conflicts:
#	server/jetstream_cluster_3_test.go
2022-12-06 10:51:22 -08:00
Derek Collison
381be704e0 Undo bad commit for raft.go
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-06 05:30:49 -08:00
Derek Collison
0fd8ad6905 Fix flapping test
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-06 05:10:15 -08:00
Derek Collison
90c7df2a59 Merge branch 'main' into dev
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-06 04:03:55 -08:00
Byron Ruth
d55ec395a3 Update --signal usage help
This includes `ldm` and `term`.

Signed-off-by: Byron Ruth <b@devel.io>
2022-12-06 06:45:00 -05:00
Derek Collison
d9c764703c Merge branch 'main' into dev 2022-12-06 03:31:49 -08:00
Derek Collison
65a833ccd9 Merge pull request #3680 from ripienaar/snapshot_full_state
Do not gather full state for snapshots
2022-12-06 03:31:17 -08:00
Derek Collison
74c373233f Update to test
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-05 17:32:52 -08:00
Derek Collison
746b01f988 Merge branch 'main' into dev 2022-12-05 16:20:00 -08:00
R.I.Pienaar
9bbc01384e Do not gather full state for snapshots
This avoids hust state outputs for streams with many
deleted items

Signed-off-by: R.I.Pienaar <rip@devco.net>
2022-12-05 22:05:12 +01:00
Todd Beets
ef27d4d534 tag policies not honored in reassignment after peer remove 2022-12-04 20:39:11 -08:00
Derek Collison
5f7c8e21a2 Fixed issues with multiple concurrent stream create requests.
First issue was applications not getting any response.
However, there was also a more serious issue that would create multiple raft groups for each concurrent request.
The servers would only run one stream monitor loop, however they would update the state to the new raft group's name, so on server restart the stream would be using a different raft group then existing servers.

Signed-off-by: Derek Collison <derek@nats.io>
2022-12-04 19:13:51 -08:00
Derek Collison
be1a5d4b58 Merge branch 'main' into dev 2022-12-02 15:53:38 -08:00
Marco Primi
f20101370c Adjust minimum operations for JetStream benchmarks
Lower minimum amount of data / number of operations so that benchmarks 
can run in reasonable time.

Minimum amount of work should be controlled via `-benchtime` flag. But 
due to these hardcoded limits, some tests were taking too long.

e.g. Running for 2 minutes even with `-benchtime` set to 1 second.
2022-12-02 15:29:34 -08:00
R.I.Pienaar
e6c78f1a59 allow expiration timer logic to be called unlocked
This ensures the logic that triggers user disconnections
share the same code paths and sets the same variables

Signed-off-by: R.I.Pienaar <rip@devco.net>
2022-12-02 15:38:54 +01:00
Derek Collison
8365fb3ef4 Add in expiration to user info.
This is only added if set by a user or account expiration claim.
It is represented as a duration til expiration vs absolute time which would involve time zone and clock sync issues.

Signed-off-by: Derek Collison <derek@nats.io>
2022-11-28 09:20:14 -08:00
Derek Collison
baf9f42d9f Fix tests
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-27 19:49:52 -08:00
Derek Collison
d2f1b04d34 Add in user info requests to have connected users get info for bound account and permissions.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-27 18:16:02 -08:00
Derek Collison
62ce2e46ab Remove "" and replace with _EMPTY_
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-27 13:59:05 -08:00
Derek Collison
be0558cfa0 Merge pull request #3666 from ch629/main
Add account, stream and consumer name to consumer alignment cleanup warning
2022-11-25 15:27:39 -08:00
Charlie Howes
a89fab0bad Add account, stream and consumer name to consumer alignment cleanup warning 2022-11-25 19:53:09 +00:00
Derek Collison
5738eeb089 Merge branch 'main' into dev 2022-11-25 11:10:01 -08:00
Derek Collison
a5814dad1f In operator mode do not set a no_auth_user for $G.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-25 10:20:35 -08:00
Derek Collison
9dc633fd6e Add a system account responder for IDZ along with STATSZ etc.
This will avoid write locks and any non-static data.

Signed-off-by: Derek Collison <derek@nats.io>
2022-11-22 16:06:43 -08:00
Derek Collison
8637a8fcd3 Merge branch 'main' into dev
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-22 13:01:53 -08:00