Commit Graph

6692 Commits

Author SHA1 Message Date
Derek Collison
7232ff2e32 Merge branch 'main' into dev 2022-12-13 16:38:11 -08:00
Derek Collison
5f9a69e4f9 Make sure js is non-nil.
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-13 16:37:00 -08:00
Derek Collison
03b2fd2ced Fixups for tests
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-13 13:20:48 -08:00
Derek Collison
3877ee2411 Merge branch 'main' into dev 2022-12-13 13:08:35 -08:00
Derek Collison
dbc81b9c8b Merge pull request #3700 from mprimi/tests_temp_dir_cleanup
Temporary test files cleanup
2022-12-13 12:27:26 -08:00
Derek Collison
c27e9b8080 Merge pull request #3706 from nats-io/sparse-latency
Improve performance and latency with large number of sparse consumers.
2022-12-13 10:45:07 -08:00
Derek Collison
855f790e3c Improve performance and latency with large number of sparse consumers.
When a stream had a large number of consumers on a server that were sparse, the signaling mechanism would do a linear scan to signal matching consumers. As usage patterns have continued to have more consumers that are filteres and sparse, meaning a message is destined for a single or small number of consumers.

This change moves selection to a sublist that tracks only active consumer leaders for selection, which optimizes selection of consumers to signal when the number of consumers is large.

Signed-off-by: Derek Collison <derek@nats.io>
2022-12-13 10:09:59 -08:00
Derek Collison
7df3fb35c1 Merge branch 'main' into dev 2022-12-13 10:04:18 -08:00
Derek Collison
c2188a40ac Merge pull request #3709 from nats-io/zero-bug
Fix for regression in which peer re-assign to a former RG would zero state
2022-12-13 10:03:56 -08:00
Todd Beets
c0ca398b83 use jsz instead of struct direct in final state test 2022-12-12 20:00:14 -08:00
Marco Primi
f8a030bc4a Use testing.TempDir() where possible
Refactor tests to use go built-in temporary directory utility for tests.

Also avoid binding to default port (which may be in use)
2022-12-12 13:18:44 -08:00
Todd Beets
63ab132fcf Merge pull request #3707 from nats-io/zb-fix
[FIXED] Make sure we remove node from stream assignment.
2022-12-12 12:49:25 -08:00
Derek Collison
17484bd701 Fix test
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-12 13:12:36 -05:00
Derek Collison
fa67c50bec Make sure we clear the old raft node from our stream assignment.
This would not allow a re-assignment of a peer to work correctly.

Signed-off-by: Derek Collison <derek@nats.io>
2022-12-12 12:51:08 -05:00
Todd Beets
ad69e1c535 test for tainted remove peer 2022-12-10 11:50:08 -08:00
Derek Collison
ef32cba064 Merge branch 'main' into dev 2022-12-10 10:33:25 -05:00
Derek Collison
dcd7ffdc4b Merge pull request #3704 from nats-io/issue-3703
Fix /healthz?js-enabled=true behavior
2022-12-10 07:32:47 -08: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
e5b383c5c0 Merge branch 'main' into dev 2022-12-08 09:53:05 -08:00
Derek Collison
5b42cda4dd Merge pull request #3699 from nats-io/bump-2.9.10
Bump version to 2.9.10-dev
2022-12-08 09:51:43 -08: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
Derek Collison
825949bc52 Merge pull request #3697 from nats-io/release-2.9.9
Prepare for next release
2022-12-08 09:24:53 -08:00
Byron Ruth
d8b9688567 Prepare for next release
Signed-off-by: Byron Ruth <b@devel.io>
2022-12-08 12:22:38 -05:00
Derek Collison
10be43aa05 Merge branch 'main' into dev 2022-12-08 09:19:47 -08:00
Derek Collison
a0cbee426f Merge pull request #3696 from nats-io/go-1.19.4
Bump Travis to use Go 1.19.4
2022-12-08 09:17:29 -08:00
Byron Ruth
b19f0205e4 Bump Travis to use Go 1.19.4
Signed-off-by: Byron Ruth <b@devel.io>
2022-12-08 11:16:19 -05:00
Derek Collison
bf19db17e0 Merge pull request #3695 from nats-io/accs-resolver-jwt-tests
Fix JWT tests JS store dir
2022-12-07 17:10:34 -08: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
13edbeb0a8 Merge pull request #3694 from nats-io/test-3191
Extensive test in support of issue #3191.
2022-12-07 13:00:15 -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
Derek Collison
effccfd44e Merge pull request #3692 from Lawo-Ext/main
Fix for #3682 (Take 2): do not delay PINGs for GATEWAY or spoke LEAF connections
2022-12-07 08:27:18 -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
Todd Beets
8021ee8db4 Merge pull request #3691 from nats-io/ut-test-fix-2
Make stream removal from a server consistent.
2022-12-06 17:39:23 -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
d410fce426 Merge pull request #3689 from nats-io/ghost-ephemerals
Ensure that consumers that are deleted on startup are removed from the system.
2022-12-06 15:39:41 -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