Commit Graph

6722 Commits

Author SHA1 Message Date
Tomasz Pietrek
6e9d05988c Try dirty approach
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
2022-12-28 13:06:17 +01:00
Derek Collison
ae988ed919 Merge branch 'main' into dev 2022-12-26 08:15:49 -08:00
Derek Collison
51678dd8bf Merge pull request #3744 from nats-io/fix-3704-compat
Add back existing HealthzOptions.JSEnabled field
2022-12-26 08:14:32 -08:00
Byron Ruth
1477b675ff Add back existing HealthzOptions.JSEnabled field
This fixes a backwards incompat change for library usage as well as
using the healthz NATS API which depends on the JSON payload.

Signed-off-by: Byron Ruth <byron@nats.io>
2022-12-26 08:45:22 -05:00
Waldemar Quevedo
8346fd3209 Bump server version
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2022-12-20 08:05:04 -08:00
Waldemar Quevedo
d44362f696 Merge pull request #3726 from nats-io/bump-2.9.11
Bump version to 2.9.11-beta
2022-12-20 07:59:21 -08:00
Byron Ruth
f6b8d9f422 Bump version to 2.9.11-beta
Signed-off-by: Byron Ruth <b@devel.io>
2022-12-20 10:56:55 -05:00
Waldemar Quevedo
4caf6aa03d Merge pull request #3725 from nats-io/release-2-9-10
Prepare for v2.9.10 release
2022-12-20 07:46:27 -08:00
Byron Ruth
b6a19e5199 Prepare for v2.9.10 release
Signed-off-by: Byron Ruth <b@devel.io>
2022-12-20 10:33:43 -05:00
Derek Collison
3171309c87 Merge branch 'main' into dev 2022-12-16 13:28:12 -08:00
Derek Collison
c2285ab166 Merge pull request #3715 from nats-io/two-stream-same-sub
fix and test for overlapping stream subscription on update
2022-12-16 13:27:25 -08:00
Todd Beets
c463b398db Validate no overlapping stream subscriptions on update config (non-clustered jetstream) 2022-12-16 12:58:59 -08:00
Waldemar Quevedo
a04b2a7cff Merge pull request #3718 from nats-io/go-get-nsc-v2
Update nsc go install to use go modules
2022-12-15 11:29:29 -08:00
Derek Collison
51341c6367 Bump to v2.9.10-beta.1
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-15 10:09:13 -08:00
Derek Collison
5e531b38cb Merge branch 'main' into dev 2022-12-15 07:27:54 -08:00
Derek Collison
860c032939 Merge pull request #3717 from nats-io/fix-3652
[FIXED] Failure to store msg with `error opening msg block file [""]: open : no such file or directory`
2022-12-15 07:26:47 -08:00
Derek Collison
a85318bc76 Under the right circumstances Compact could leave a danling last msg block leading to error opening msg block file [""]: open : no such file or directory
When the compaction would not uplevel to a normal purge, but after completion all msg blocks were empty the mb.lmb was not cleared or reset properly.

Signed-off-by: Derek Collison <derek@nats.io>
2022-12-15 06:59:54 -08:00
Derek Collison
92766f0dfc Merge branch 'main' into dev 2022-12-15 04:53:15 -08:00
Derek Collison
d937e92d55 Merge pull request #3714 from nats-io/consumer-info
Simplify locking for consumer info requests.
2022-12-15 04:46:23 -08:00
Derek Collison
786298469c Simplify locking for consumer info requests.
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-14 18:52:15 -08:00
Waldemar Quevedo
74d9c51533 Update nsc go install to use go modules 2022-12-14 17:11:14 -08:00
Derek Collison
d7b1723d1d Merge branch 'main' into dev 2022-12-14 16:56:52 -08:00
Derek Collison
a68194579d Merge pull request #3713 from nats-io/lazarus-mem-leader
fix and test for clustered mem store asset no-quorum if leader restarted
2022-12-14 16:56:33 -08:00
Todd Beets
47c87eb71c fix and test for clustered mem store asset no-quorum if leader restarted 2022-12-14 16:16:08 -08:00
Derek Collison
41c1dd9ea8 Merge branch 'main' into dev
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-14 12:14:22 -08:00
Derek Collison
6ff03574fb Merge pull request #3710 from nats-io/sparse-latency-cp
Improve performance and latency with large number of sparse consumers.
2022-12-14 12:12:03 -08:00
Derek Collison
ab36c6d3d8 Merge branch 'main' into dev 2022-12-14 07:51:35 -08:00
Derek Collison
294ea58c3c Merge pull request #3711 from nats-io/expire-failing
[FIXED] Bad first sequence and expiration stopped working after server restart.
2022-12-14 07:49:47 -08:00
Derek Collison
1a55eb5a7a Fix for condition after restart where first seq was wrong and reported zero timestamp and expiration stopped working.
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-14 07:19:05 -08:00
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
c90fe9a2fa 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 15:25:55 -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