Commit Graph

6553 Commits

Author SHA1 Message Date
Derek Collison
43a4ba6d9f Merge branch 'main' into dev 2022-11-14 08:40:58 -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
a5398e1902 Merge pull request #3617 from nats-io/add-unique-tag
add unique_tag to JetStreamConfig for varz/jsz visibility
2022-11-12 09:08:53 -08:00
Todd Beets
40bbfbacc9 correct spaces to tabs in raw string literal 2022-11-12 07:53:20 -08:00
Derek Collison
a2f8dbfafc Merge branch 'main' into dev 2022-11-11 17:08:39 -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
bc084d4e27 Merge branch 'main' into dev 2022-11-11 16:54:07 -07: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
Todd Beets
aae1d62378 test for unique_tag present in response 2022-11-11 15:26:01 -08: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
Todd Beets
571a375f2e add unique_tag to JetStreamConfig for varz/jsz visibility 2022-11-11 13:36:13 -08:00
Derek Collison
14ce9192f3 Merge branch 'main' into dev 2022-11-09 19:46:52 -08: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
837b36bf5f Merge branch 'main' into dev 2022-11-09 18:08:28 -07: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
cf7c6a373c Merge branch 'main' into dev 2022-11-08 09:57:22 -07: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
ea955b23a1 Merge branch 'main' into dev 2022-11-07 17:48:40 -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
4e8d1ae225 Merge branch 'main' into dev 2022-11-05 14:27:01 -07:00
Derek Collison
0220ce2665 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 14:26:56 -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
aecd067443 Merge branch 'main' into dev 2022-11-04 10:47:35 -06: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
Ivan Kozlovic
f091004c0c Merge branch 'main' into dev 2022-11-03 16:52:54 -06:00
Ivan Kozlovic
3e467fc114 Merge pull request #3606 from nats-io/fix_3559
[FIXED] JetStream: Sources with OptStartTime gets redelivered
2022-11-03 16:25:00 -06:00
Ivan Kozlovic
c16ccd34c3 [FIXED] JetStream: Sources with OptStartTime gets redelivered
If start by time is before what we remember during recovery use that instead

Resolves #3559

Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-03 16:09:06 -06:00
Ivan Kozlovic
83c32429a8 Merge branch 'main' into dev 2022-11-03 14:34:58 -06:00
Derek Collison
c9fd776889 Merge pull request #3605 from nats-io/fix-3606
[FIXED] Notifying waiting pull consumers on consumer or parent stream deletion.
2022-11-03 13:05:47 -07:00
Derek Collison
72ff2edb5f Fix for #3603.
Signed-off-by: Derek Collison <derek@nats.io>
2022-11-03 12:46:41 -07:00
Ivan Kozlovic
2250f10093 Merge branch 'main' into dev 2022-11-03 13:01:35 -06:00
Ivan Kozlovic
edf0fe31b0 Merge pull request #3604 from nats-io/fix_3191
[FIXED] LeafNode: possible duplicate messages in complex setup
2022-11-03 12:57:36 -06:00
Ivan Kozlovic
91c84c03c2 [FIXED] LeafNode: possible duplicate messages in complex setup
This is specific to setup described [here](https://github.com/nats-io/nats-server/issues/3191#issuecomment-1296974382)
and does not require JetStream to be reproduced. The added test
reproduces the above setup but without JetStream enabled in
the accounts.

Each cluster has a leafnode for a given account to the other
cluster. The accounts import/export a subject. When a consumer
is connected to cluster "B" and the producer is on cluster "A"
there was a duplicate message. Due to shadow subscription caused
by the import/export rules, an additional subscription was
sent across the leafnode.

Resolves #3191

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-11-03 12:34:01 -06:00
Derek Collison
9fa7c1152b Merge branch 'main' into dev 2022-11-02 14:50:40 -07:00
Derek Collison
0f8aa11422 Merge pull request #3601 from nats-io/lag-warning
[FIXED] On stream proposal failures we could accidentally warn about high stream lag.
2022-11-02 14:48:29 -07:00
Derek Collison
56919ebc97 On stream proposal failures we could accidentally warn on high stream lag.
We were not taking the clfs into account.

Signed-off-by: Derek Collison <derek@nats.io>
2022-11-02 14:40:31 -07:00
Ivan Kozlovic
704b147a95 Merge branch 'main' into dev 2022-11-02 12:35:57 -06:00