Commit Graph

6399 Commits

Author SHA1 Message Date
Ivan Kozlovic
9bd11580e3 [FIXED] JetStream: User-defined ephemeral Name not used in cluster mode
If the user sends a CONSUMER.CREATE request with a configuration that
specifies the name that the user wants for the ephemeral consumer,
this would not work on cluster mode, that is, the server would still
pick a name instead of using the provided one.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 13:48:38 -06:00
Ivan Kozlovic
e42260cc80 Merge pull request #3539 from nats-io/js_handle_bad_replicas_count
[FIXED] JetStream: return error on negative replicas count
2022-10-10 13:44:34 -06:00
Ivan Kozlovic
cf71adb9de Merge pull request #3538 from nats-io/fix_import_own_export
[FIXED] Stack overflow when account imports its own export
2022-10-10 13:34:30 -06:00
Ivan Kozlovic
c3adf78702 [FIXED] Stack overflow when account imports its own export
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 13:20:26 -06:00
Ivan Kozlovic
3c7aa554f7 [FIXED] JetStream: return error on negative replicas count
If a stream is created or updated with a negative replicas count,
and error is now returned. Same for consumers.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 12:32:41 -06:00
Ivan Kozlovic
d9bf82bbda Merge pull request #3536 from nats-io/fix_main_help
Adjust "nats-server -h" output
2022-10-10 12:28:43 -06:00
Ivan Kozlovic
1a278f9066 Adjust "nats-server -h" output
Related to PR #3527

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 11:21:22 -06:00
Ivan Kozlovic
0fd2649f79 Merge pull request #3527 from ariel-zilber/patch-1
Fix to issues  #3524 and #3521
2022-10-10 11:01:20 -06:00
Derek Collison
cb086bcef9 Merge pull request #3530 from nats-io/dc
Test to make sure a consumer that is deleted while a server is down recovers correctly.
2022-10-07 17:38:42 +01:00
Derek Collison
c88784dcad Test to make sure a consumer that is deleted while a server is down recovers correctly.
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-07 09:24:54 -07:00
Ivan Kozlovic
207195c66c Merge pull request #3529 from nats-io/js_fix_fs_filtered_purge
[FIXED] JetStream: Purge with additional options may leave some messages
2022-10-06 17:01:38 -06:00
Ivan Kozlovic
57a3594355 [FIXED] JetStream: Purge with additional options may leave some messages
While going over message blocks, when some blocks were removed there
was a risk that a block is ignored, leaving some messages around.

Resolves #3528

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-06 13:21:20 -06:00
ariel-zilber
8fd30ff5c3 Update main.go 2022-10-06 12:40:21 +03:00
Ivan Kozlovic
b7a5163d5d Merge pull request #3523 from ariel-zilber/main
fix to  bug  #3522 - update usage guide message in main.go
2022-10-05 09:45:47 -06:00
ariel-zilber
6ef5c520b2 Update main.go 2022-10-05 18:30:52 +03:00
ariel-zilber
04a5c0be3c fix to bug #3522 - update usage guide message in main.go 2022-10-05 17:14:41 +03:00
Ivan Kozlovic
37ca972251 Bump version to 2.9.3-beta.1
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-05 07:14:01 -06:00
Ivan Kozlovic
348b3d4068 Merge pull request #3519 from nats-io/fix_3516
[FIXED] JetStream: unresponsiveness while creating raft group
2022-10-05 07:12:27 -06:00
Ivan Kozlovic
3472f6aec2 [FIXED] JetStream: unresponsiveness while creating raft group
Originally, createRaftGroup() would not hold the jetstream's lock
for the whole duration. But some race reports made us change
this function to keep the lock for the whole duration. A test
called TestJetStreamClusterRaceOnRAFTCreate() was demonstrating
the race between "consumer info" request handling and createRaftGroup
code. Since then, the race has been fixed, so this PR restores
the more fine-grained locking inside createRaftGroup.

Resolves #3516

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-04 17:27:36 -06:00
Ivan Kozlovic
9f4513c9f7 Bump version to v2.9.3-beta as part of release process
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-30 10:27:58 -06:00
Ivan Kozlovic
6d81dde81b Merge pull request #3513 from nats-io/release_2_9_2
Release v2.9.2
2022-09-29 15:23:16 -06:00
Ivan Kozlovic
34851bfeae Release v2.9.2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-29 15:21:53 -06:00
Ivan Kozlovic
521bfd287a Merge pull request #3512 from nats-io/update_deps
[UPDATED] Dependencies
2022-09-29 15:21:04 -06:00
Ivan Kozlovic
1039df088c [UPDATED] Dependencies
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-29 15:00:44 -06:00
Ivan Kozlovic
9cd2b7fa70 Merge pull request #3511 from nats-io/js_last_per_subject_redeliveries
[FIXED] JetStream: redeliveries for LastPerSubject delivery policy
2022-09-29 14:39:13 -06:00
Ivan Kozlovic
46aec649e4 [FIXED] JetStream: redeliveries for LastPerSubject delivery policy
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-29 14:00:18 -06:00
Ivan Kozlovic
0841786d6c Bump to 2.9.2-beta.1
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-29 09:26:09 -06:00
Ivan Kozlovic
44d4c1cbb5 Merge pull request #3508 from nats-io/meta-snap
Allow meta layer to snapshot on a clean shutdown.
2022-09-29 09:22:59 -06:00
Derek Collison
91edd1a8d0 With snapshots both streams are present on restart so sources or mirrors that have a subject change from the origin would not recover.
We now suppress that if we know we are recovering an existing stream.

Signed-off-by: Derek Collison <derek@nats.io>
2022-09-29 09:17:15 -06:00
Derek Collison
52b5cd12bb Allow meta layer to snapshot on a clean shutdown.
Signed-off-by: Derek Collison <derek@nats.io>
2022-09-29 09:17:12 -06:00
Derek Collison
0d14ec200f Merge pull request #3510 from nats-io/consumer-names-paging-bug
[FIXED] bug in consumer names paging, did not honor limits and returned duplicate results.
2022-09-29 06:33:52 -07:00
Derek Collison
fef702a688 [FIXED] bug in consumer names paging, did not honor limits and returned duplicate results.
Signed-off-by: Derek Collison <derek@nats.io>
2022-09-29 06:14:00 -07:00
Ivan Kozlovic
98de9136ce Merge pull request #3504 from nats-io/fanout_perf
[IMPROVED] Fan-out performance
2022-09-28 09:33:10 -06:00
Ivan Kozlovic
8d9c57ad44 [IMPROVED] Fan-out performance
There was an observed degradation (around 5%) for large fan out in
v2.9.0 compared to earlier release. This is because we added
accounting of the in/out messages for the account, which result
in 4 atomic operations, 2 for in and 2 for out, however, it means
that for a fan-out of say 100 matching subscriptions, it is now
2 + 2 * 100 = 202.

This PR rework how the stats accounting is done which removes
the regression and even boost a bit the numbers since we are
doing the server stats update as an aggregate too.

There are still degradation for queues and no-sub at all that
need to be looked at.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-27 19:43:32 -06:00
Ivan Kozlovic
8247ecbf20 Merge pull request #3502 from nats-io/fix_3493
[FIXED] JetStream: Scale down of consumer to R1 would not get a response
2022-09-27 15:33:38 -06:00
Ivan Kozlovic
c93c2648af Merge pull request #3501 from nats-io/js_filestore_mem
[FIXED] JetStream: File store memory usage
2022-09-27 10:10:49 -06:00
Ivan Kozlovic
e151cfcd57 [FIXED] JetStream: Scale down of consumer to R1 would not get a response
Updating a consumer configuration from say R3 to R1 would work
but no response was received by the client sending the request.

Resolves #3493

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-27 10:02:31 -06:00
Derek Collison
2f1f6221bc Make sure to clear fss state on disk
Signed-off-by: Derek Collison <derek@nats.io>
2022-09-26 19:53:19 -07:00
Ivan Kozlovic
c4bd813fab [FIXED] JetStream: File store memory usage
The write cache may be pinned for longer than needed when creating
a new write block. This could be seen in some benchmark tests.

The old block cache would be kept for 5 more seconds, which, with
a fast rate of inserts could start to show in some memory profiling.

This was a change introduced in https://github.com/nats-io/nats-server/pull/3351
which was different than code in v2.8.4

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-26 19:06:12 -06:00
Ivan Kozlovic
d587b7823f Merge pull request #3498 from nats-io/js_panic_cons_assignment
[FIXED] JetStream: prevent panic on consumer assignment
2022-09-26 15:28:11 -06:00
Ivan Kozlovic
08968287d5 [FIXED] JetStream: prevent panic on consumer assignment
It could be that while the routine processing the consumer assignment
runs the stream is being stopped, which would lead to a panic.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-26 13:11:35 -06:00
Ivan Kozlovic
970e2c81d4 Merge pull request #3497 from nats-io/fix/protocol-error-byte-formatting
[FIXED] Format protocol error []byte with %q
2022-09-26 12:40:01 -06:00
Caleb Lloyd
3babdda3bb [FIXED] Format protocol error []byte with %q
Protocol errors print arguments that contain arbitrary []byte
and are possibly not formattable strings; use %q to escape

Signed-off-by: Caleb Lloyd <caleb@synadia.com>
2022-09-26 13:52:56 -04:00
Ivan Kozlovic
74c0b18fd2 Bump version to 2.9.2-beta as per release process
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-22 15:33:36 -06:00
Ivan Kozlovic
2363a2c3b0 Merge pull request #3492 from nats-io/release_2_9_1
Release v2.9.1
2022-09-22 14:44:17 -06:00
Ivan Kozlovic
a9293979b0 Release v2.9.1
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-22 14:32:18 -06:00
Ivan Kozlovic
ffe21f075b Merge pull request #3491 from nats-io/update_deps
[UPDATED] Dependencies
2022-09-22 14:30:25 -06:00
Ivan Kozlovic
f88f2265d2 [UPDATED] Dependencies
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-22 14:13:40 -06:00
Ivan Kozlovic
e5d3b6b0de Merge pull request #3489 from nats-io/ln_ws_no_auth
[FIXED] LeafNode: connecting using websocket and no_auth_user
2022-09-22 10:57:20 -06:00
Ivan Kozlovic
cfd4f7d5b3 [FIXED] LeafNode: connecting using websocket and no_auth_user
If the `no_auth_user` is set in the `websocket{}` block and a
server creates a leafnode connection using the websocket port,
and does not provide credentials, that no_auth_user should be
used, but was not.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-22 10:35:36 -06:00