R.I.Pienaar
a3bbb04748
Merge pull request #2409 from ripienaar/js_errors_redux
...
attempt to improve UX of the error system
2021-08-10 20:01:24 +02:00
Derek Collison
cf1258b73a
Merge pull request #2426 from nats-io/max-per-default
...
Fix for #2420
2021-08-10 07:35:05 -07:00
Derek Collison
7dd399e355
Merge branch 'main' into max-per-default
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-10 07:33:58 -07:00
R.I.Pienaar
76ab1b8d17
attempt to improve UX of the error system
...
Previously we had a few confusing functions like NewT
and similar that were quite fragile to use due to minimal
validation and a panic in go stdlib string Replacer.
Now we generate helper methods for every string, these
are used to access errors, fill in templates and conditional
returns of error type using the new Unless() option
We now get compile time errors for some common mistakes
and have better IDE helpers for arguments etc
Signed-off-by: R.I.Pienaar <rip@devco.net >
2021-08-10 16:08:28 +02:00
Derek Collison
b38c361afd
Merge pull request #2427 from nats-io/bad-err
...
Fix for #2423
2021-08-10 07:03:39 -07:00
Derek Collison
6f4cc20d27
Merge pull request #2425 from nats-io/fc-stall
...
Simplify flow control for consumers for mirrors and sources.
2021-08-10 06:50:28 -07:00
Derek Collison
cb6b397573
Fix for #2423
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-10 06:46:48 -07:00
Derek Collison
633763a202
Fix for #2420
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-10 06:36:08 -07:00
Derek Collison
29536629eb
Simplified flow control, avoid stalls due to msg loss
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-09 20:13:17 -07:00
Derek Collison
a0b5a53870
Update Go client
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-09 20:09:58 -07:00
Derek Collison
52cfce24c4
Merge pull request #2421 from nats-io/subs-leak
...
[FIXED] Subscription leaks when auto-unsub used after delivered > max.
2021-08-08 08:00:06 -07:00
Derek Collison
8e5314b67f
Fix for subscription leak.
...
If an auto-unsub request was received after the subscription had already delivered more than the limit, the subscription will leak.
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-07 16:58:25 -07:00
Derek Collison
149ed38b57
Update Go client
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-07 16:57:51 -07:00
Derek Collison
e03c3da67c
Bump version
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-07 14:38:11 -07:00
Derek Collison
7c089a423a
Merge pull request #2418 from nats-io/dir-not-empty
...
[FIXED] #2417
2021-08-07 12:35:19 -07:00
Derek Collison
9f8b73d685
Merge pull request #2419 from nats-io/consumer-panic-stream-delete
...
[FIXED] #2416
2021-08-07 12:34:53 -07:00
Derek Collison
40c21934c5
Fix for #2416
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-06 14:58:25 -07:00
Derek Collison
b517229c32
Fix for #2417
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-06 14:44:00 -07:00
Ivan Kozlovic
7112ae06a5
Merge pull request #2414 from nats-io/release_2_3_4
...
Release v2.3.4
2021-08-04 17:05:35 -06:00
Ivan Kozlovic
ed9e6b24c2
Release v2.3.4
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-08-04 17:02:26 -06:00
Ivan Kozlovic
ff1a3be227
Merge pull request #2413 from nats-io/fix_max_payload_check
...
[CHANGED] Check that max_payload is not greater than max_pending
2021-08-04 17:00:16 -06:00
Ivan Kozlovic
2939814999
Report the limit using MAX_PAYLOAD_MAX_SIZE instead of hardcoded in warning
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-08-04 16:54:31 -06:00
Ivan Kozlovic
d1365b7412
Add warning if max_payload > 8MB
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-08-04 16:52:17 -06:00
Ivan Kozlovic
4865dc7ae3
[CHANGED] Check that max_payload is not greater than max_pending
...
This is related to PR #2407 . Since the 64MB pending size is actually
configurable, we should fail only if max_payload is greater than
the configured max_pending. This is done in validateOptions() which
covers both config file and direct options in embedded cases.
The check in opts.go is reverted to max int32 since at this point
we don't know if/what max_pending will be, so we simply check
that it is not more than a int32.
For the next minor release, we could have another change that
imposes a lower limit to max_payload (regardless if max_pending
is higher).
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-08-04 16:33:21 -06:00
Derek Collison
0462c350c8
Merge pull request #2412 from nats-io/pending-off-by-1
...
Fix for initial pending and DeliverLastPerSubject
2021-08-04 14:41:53 -07:00
Derek Collison
bf966d84f3
Number of initial pending was off by one when DeliverLastPerSubject was utilized on a consumer.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-04 14:20:52 -07:00
Derek Collison
dfd9548d98
Merge pull request #2406 from nats-io/consumer-panic
...
Various bug fixes and improvements to clustered filestore consumer stores.
2021-08-04 08:36:24 -07:00
Derek Collison
2afaf1cd5e
Merge pull request #2410 from nats-io/same-domain
...
[FIXED] #2401
2021-08-04 08:32:23 -07:00
Derek Collison
883e2876e9
Merge pull request #2407 from jnmoyne/fix-max-max-payload-value
...
Due to internal limits the actual maximum payload size is 64Mb. Beyon…
2021-08-04 08:07:44 -07:00
Derek Collison
09012f0847
Fix for #2401 .
...
Leafnodes with same domain and shared system account should behave like flat jetstream network.
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-04 07:07:29 -07:00
jnmoyne
b5e3f8d394
Due to internal limits the actual maximum payload size is 64Mb. Beyond that the subscribing process is unable to receive the messages, so adjusting the maximum size the server allows you to set for max_payload.
2021-08-04 00:28:23 -07:00
Derek Collison
398ae95a4a
Various bug fixes and improvements to filestore consumer stores.
...
Improved behavior around clustered persistent consumers.
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-03 22:17:49 -07:00
Derek Collison
f417d20cd1
Merge pull request #2404 from nats-io/js-consumer-deadlock
...
[FIXED] Fix for #2403
2021-08-03 16:18:27 -07:00
Derek Collison
154bc40718
Fix for reentrant read lock on a stream that once anyone else wanted the write lock would deadlock.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-03 15:46:40 -07:00
Ivan Kozlovic
8d2faadb5c
Test to reproduce panic on consumer state recovery
...
You may have to run the test multiple times:
```
go test -race -v -run=TestJetStreamPanicDecodingConsumerState ./server -count=10
```
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-08-03 15:35:46 -06:00
Ivan Kozlovic
aaba459d52
Merge pull request #2396 from nats-io/release_2_3_3
...
Release v2.3.3
2021-08-02 11:54:09 -06:00
Ivan Kozlovic
76006273d5
Release v2.3.3
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-08-02 11:36:43 -06:00
Ivan Kozlovic
d8ee5378a7
Merge pull request #2395 from nats-io/update_jwt_deps
...
Update go.mod JWT reference to latest release
2021-08-02 10:41:23 -06:00
Ivan Kozlovic
50c0b40907
Update go.mod JWT reference to latest release
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-08-02 09:39:35 -06:00
Ivan Kozlovic
7ec4ce986a
Merge pull request #2376 from nats-io/ocsp_leaf_missing
...
[FIXED] OCSP: parse cert.Leaf if not set
2021-08-02 09:20:09 -06:00
Derek Collison
e34f365fa1
Merge pull request #2394 from nats-io/consumer-delivery-after-purge
...
Fix for #2392 . We were not resetting the pending timer properly during a stream purge.
2021-08-01 17:56:47 -07:00
Derek Collison
067ef19ce9
Fix for #2392 . We were not resetting the pending timer properly during stream purge.
...
No we just let it fire as normal and it will be canceled or not as needed.
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-01 17:28:59 -07:00
Derek Collison
3c6618d409
Merge pull request #2393 from nats-io/ln-nojs-hub
...
[FIX] #2388
2021-08-01 16:34:52 -07:00
Derek Collison
925a6fe6b2
Fix for #2388 . Leafnodes with no JS can seamlessly access a HUB with JS.
...
This is the reverse of the early work to have LNs extend a non-JS cluster.
Also have mixed mode tests as well.
Signed-off-by: Derek Collison <derek@nats.io >
2021-08-01 14:57:47 -07:00
Derek Collison
19bfef59ed
Merge pull request #2390 from nats-io/deliver-last-per-bug
...
Off by one bug (surprise) that would skip first new message on deliver last per subject.
2021-07-30 15:37:23 -07:00
Derek Collison
170b0570d4
Off by one bug (surprise) that would skip first new message on deliver last per subject.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-07-30 15:19:01 -07:00
Derek Collison
22af59f758
Merge pull request #2387 from nats-io/expire-on-start-fixes
...
[IMPROVED] Server restart time with many expired JetStream messages.
2021-07-30 12:49:50 -07:00
Derek Collison
4e92b0ed6e
When a server was restarting, if a stream had a MaxAge and there were a very large amount of messages to expire, this would take too long.
...
During normal operation and quick restarts the number of expired messages per cycle is manageable and correct.
However if a server is shutdown for quite a long time and many messages have expired this process is too slow.
This commit introduces an optimized expiration tailored for startup vs running state.
Signed-off-by: Derek Collison <derek@nats.io >
2021-07-30 12:48:47 -07:00
Derek Collison
e6049d473d
Merge pull request #2381 from nats-io/deliver-last-per-subject
...
Allow delivery policy of DeliverLastPerSubject, which is helpful for K/V on JetStream
2021-07-29 05:54:26 -07:00
Derek Collison
fb4cfb8c71
Merge branch 'main' into deliver-last-per-subject
2021-07-29 05:52:28 -07:00