Commit Graph

6538 Commits

Author SHA1 Message Date
Derek Collison
d6f243f39b Merge pull request #3646 from raypinto/add-stream-created-ts
Added stream created timestamp to stream detail
2022-11-17 05:54:43 -08:00
Raymond
4d8964e57b Added stream created timestamp to stream detail 2022-11-17 13:59:58 +01:00
Ivan Kozlovic
deb9d252a3 Bump version to 2.9.7-RC2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-16 17:23:15 -07:00
Ivan Kozlovic
74a16b0097 Merge pull request #3640 from nats-io/fix_3639
[FIXED] JetStream: WorkQueue not preventing overlapping consumers
2022-11-16 17:22:35 -07:00
Ivan Kozlovic
49faba9e33 [FIXED] JetStream: WorkQueue not preventing overlapping consumers
A stream with a WorkQueue retention policy is supposed to allow
more than one consumer if they user filtered subjects, but those
subjects should not overlap.

There was an issue that if a new consumer had a filter subject
"wider" than an existing one, the error was not detected and
the new consumer was incorrectly accepted.

Resolves #3639

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-16 17:09:30 -07:00
Derek Collison
aeba37685b Merge pull request #3638 from nats-io/cc-mirror
[FIXED] Make mirror consumers use filtered version of consumer create
2022-11-16 15:27:30 -08:00
Derek Collison
e4b5b7ec64 Make mirror consumers use filtered version of consumer create like source consumers.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-16 15:12:14 -08:00
Derek Collison
46032f25c7 Merge pull request #3635 from nats-io/fix-3630
[FIXED] Allow any type of ack to suppress auto-cleanup of consumer.
2022-11-16 12:12:02 -08:00
Derek Collison
6cb7f68ef7 Updates based on feedback w/ Ivan
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-16 11:53:46 -08:00
Derek Collison
aa57adbcd0 Use default here
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-16 11:31:49 -08:00
Derek Collison
f696c6559e Adjust test for jitter on ephemerals.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-15 17:51:01 -08:00
Derek Collison
08c94096db Allow any type of activity to prolong auto cleanup of a consumer.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-15 17:25:18 -08:00
Ivan Kozlovic
e44612ffca Merge pull request #3634 from nats-io/fix-concurrent-write
Fix concurrent write in consumer pending map at startup
2022-11-15 17:05:40 -07:00
Colin Sullivan
9f6db71937 Fix concurrent map write
Signed-off-by: Colin Sullivan <colin@synadia.com>
2022-11-15 16:26:35 -07:00
Derek Collison
d98d0278a2 Bump to 2.9.7-RC1
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-15 12:13:10 -08:00
Derek Collison
765cdce0b5 Merge pull request #3633 from nats-io/consumers-scale
Offload signaling to consumers when number is large.
2022-11-15 12:04:08 -08:00
Derek Collison
9f241f3322 Offload signaling to consumers when number is large.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-15 11:25:07 -08:00
Ivan Kozlovic
0f79b913ec Merge pull request #3631 from nats-io/fix_3626
[FIXED] JetStream: possible panic on stream info when leader not elected
2022-11-15 12:24:10 -07:00
Ivan Kozlovic
6ffa6d1e4b [FIXED] JetStream: possible panic on stream info when leader not elected
It is possible that a stream info request would be handled at a
time where the raft group would not yet be set/created, causing
a panic.

Resolves #3626 (at least the panic reports there)

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-15 11:56:41 -07:00
Derek Collison
c94a260c97 Merge pull request #3629 from nats-io/readstate-lock
When reading state, even on consumer init, should lock.
2022-11-15 08:00:58 -08:00
Derek Collison
b92ea86b80 When reading state, even on consumer init, should lock.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-15 07:40:44 -08:00
Ivan Kozlovic
b3b7772b87 Merge pull request #3627 from nats-io/fix_3623
[FIXED] JetStream: Account removal leaks subscriptions
2022-11-14 17:12:12 -07:00
Ivan Kozlovic
9e36918f41 [FIXED] JetStream: Account removal leaks subscriptions
Resolve #3623

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-14 16:40:21 -07:00
Derek Collison
3c6fa8284b Merge pull request #3625 from nats-io/auto-clean
Auto cleanup dangling messages from interest policy streams on server start.
2022-11-14 15:05:00 -08:00
Derek Collison
b6ef2c8910 Auto cleanup dangling messages from interest policy streams on server start.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-14 15:02:22 -08:00
Derek Collison
a847570030 Merge pull request #3624 from nats-io/need-ack-no-copy
[IMPROVED] Don't copy pending on needAck check.
2022-11-14 11:55:44 -08:00
Derek Collison
36ef788112 When determing whether we need an ack, no need to copy since under consumer lock.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-14 11:47:31 -08:00
Derek Collison
b76b6a1f68 Merge pull request #3620 from nats-io/fix-3612
[FIXED] Fix logic bug that would prevent some stream messages from being deleted.
2022-11-14 08:40:13 -08:00
Waldemar Quevedo
39185c11a6 Set max payload in gofuzz test (#3622)
* Set max payload in gofuzz test

This was causing the test to overrun mem limits due to max payload size
check being skipped in the parser when processing a `pub` protocol line.

Signed-off-by: Waldemar Quevedo <wally@nats.io>
2022-11-14 08:28:19 -08:00
Derek Collison
47dd97e389 Fix logic bug that would prevent some messages from being deleted on an interest based stream.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-13 17:32:38 -08:00
Derek Collison
a64c41a7fa Merge pull request #3619 from nats-io/pae-thresh
Updated pae threshold and reporting modulo to not spam logs as much.
2022-11-11 17:07:59 -08:00
Derek Collison
3ac6052b32 Updated pae threshold and reporting modulo to not spam logs as much.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-11 16:08:58 -08:00
Ivan Kozlovic
38dffbbe2a Merge pull request #3618 from nats-io/weighted_mappings
[FIXED] Weighted subject mappings updates not applied
2022-11-11 16:53:21 -07:00
Ivan Kozlovic
da287b0aea [FIXED] Weighted subject mappings updates not applied
Suppose an account is updated to have the following weighted mapping:
```
foo -> bar 40%
```
The server automatically adds foo -> foo at 60%. Sending messages
to "foo" will result in the expected distribution of 60% messages
going to "foo" and 40% going to bar.

However, if a successive update is pushed to the server(s):
```
foo -> bar 40%
foo -> baz 60%
```
The subject mapping should now be as described, that is, no more
mapping from "foo" to "foo" and 40% to bar and 60% to baz, however,
what was happening is that the server would always use the original
mapping.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-11 15:45:32 -07:00
Derek Collison
4dab6ce92c Fix test timing
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-09 19:44:22 -08:00
Ivan Kozlovic
304744ce08 Merge pull request #3615 from nats-io/js_acc_max_streams_consumers
[FIXED] JetStream: Account max streams/consumers not always honoured
2022-11-09 18:02:51 -07:00
Derek Collison
2e4f9d25d8 Merge pull request #3614 from nats-io/max-ha-assets
[FIXED] Enforce HA asset limits during peer processing as well as assignments.
2022-11-09 16:59:14 -08:00
Ivan Kozlovic
1b892837cb [FIXED] JetStream: Account max streams/consumers not always honoured
This could happen during concurrent requests where the assignments
are not yet fully processed.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-09 17:29:20 -07:00
Derek Collison
e008e015b3 Make sure to enforce HA asset limits during peer processing as well as assignment.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-09 16:24:54 -08:00
Ivan Kozlovic
9e38d061d3 Merge pull request #3613 from nats-io/update_to_route_tls_name_changes
Updates to PR #3611
2022-11-08 09:56:53 -07:00
Ivan Kozlovic
3ec42d5b85 Updates to PR #3611
- Save the TLS name only if not already set
- Use the passed URLs slice instead of using s.getOpts().Routes
- Enhanced the test
- Fixed an unrelated DATA RACE report

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-08 09:36:08 -07:00
Ivan Kozlovic
a29679068c Merge pull request #3611 from nats-io/route_tls_server_name
[FIXED] Routing: TLS connections to discovered server may fail
2022-11-07 17:48:12 -07:00
Ivan Kozlovic
2d181e1c27 [FIXED] Routing: TLS connections to discovered server may fail
The server was not setting "server name" in the TLS configuration
for route connections, which may lead to failed (re)connect if
the certificate does not allow for the IP and the URL did not
have the hostname, which would happen with gossip protocol.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-07 17:26:17 -07:00
Derek Collison
d8a4b56b8b Merge pull request #3610 from nats-io/fix-3499
[FIXED] #3499
2022-11-05 14:23:24 -07:00
Derek Collison
c6031382a1 Fix for #3499
When we deleted a consumer from an interest policy stream we would make sure to clean up any unacked messages.
However we only based start from the ack floor for the consumer and did not take into account the first sequence of the stream.

Signed-off-by: Derek Collison <derek@nats.io>
2022-11-05 13:56:45 -07:00
Ivan Kozlovic
ef00281bc2 Bump to v2.9.7-beta as per release process
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-04 10:46:45 -06:00
Ivan Kozlovic
289a9e1be0 Merge pull request #3609 from nats-io/release_2_9_6
Release v2.9.6
2022-11-04 09:56:18 -06:00
Ivan Kozlovic
00a7b4af1e Release v2.9.6
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-04 09:44:54 -06:00
Ivan Kozlovic
a2e791d26d Merge pull request #3608 from nats-io/js_scale_down_no_quorum
[FIXED] JetStream: Stream scale down while it has no quorum
2022-11-04 09:33:08 -06:00
Ivan Kozlovic
ca237bdfa0 [FIXED] JetStream: Stream scale down while it has no quorum
If a stream R2 had one of its server network-partitioned and at
that time the stream was edited to be scaled down to an R1 it
would cause the stream to no longer have quorum even when the
network partition is resolved.

Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-04 09:08:31 -06:00