Ivan Kozlovic
7b25755980
Adjust timing
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-23 09:56:42 -06:00
Ivan Kozlovic
23e8dc9902
Fix corrupt wal test that was flapping
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-23 09:36:46 -06:00
Ivan Kozlovic
7d389169d5
Update version to beta until ready to release
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-23 09:08:54 -06:00
Ivan Kozlovic
d58b2a106f
Merge pull request #2563 from nats-io/mixed_enablement_js
...
[FIXED] Storage limit of 0, which means disabled, was not always enforced
2021-09-22 17:52:05 -06:00
Ivan Kozlovic
93dc39dcda
Fixed other MQTT test that was setting JWT mem but not disk limits
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-22 17:24:33 -06:00
Ivan Kozlovic
a3be36fcd4
Moving 2 new tests to jetstream test file
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-22 17:02:29 -06:00
Ivan Kozlovic
b0d487fe68
Fix MQTT test that was not setting MaxStore
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-22 16:51:34 -06:00
Derek Collison
f6f5d6d4b2
Merge pull request #2564 from nats-io/max-consumers
...
Direct consumers used for mirroring should not be affected by max consumers limits
2021-09-22 15:29:28 -07:00
Derek Collison
944b90d4a3
Fix for no storage limits
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-22 15:28:43 -07:00
Derek Collison
ebb24006c2
Direct consumers used for mirroring should not be affected by max consumer limits
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-22 15:01:51 -07:00
Derek Collison
075e8c9070
Make sure wp is > len(cache.buf)
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-22 14:46:31 -07:00
Matthias Hanel
060beff99f
NO COMMIT, unit test to show issue with mixed enablement of js storage
...
Signed-off-by: Matthias Hanel <mh@synadia.com >
2021-09-22 17:20:14 -04:00
Derek Collison
eab45b404a
Fix for deadlock with stream mirrors or sources where origin is interest or workqueue policy.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-22 10:59:02 -07:00
Ivan Kozlovic
f34156e411
Release v2.6.0
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-21 16:17:27 -06:00
Matthias Hanel
29a6367889
incorporating review comments.
...
Signed-off-by: Matthias Hanel <mh@synadia.com >
2021-09-21 17:13:53 -04:00
Matthias Hanel
9911b37b0c
[added] value to JS stats showing memory used from accounts with reservations
...
[fixed] reservations accounting issue on reload introduced by:
commit: bfb726e8e9
clearResources appeared to have been a workaround and broke
reload for non global accounts
Signed-off-by: Matthias Hanel <mh@synadia.com >
2021-09-21 16:35:24 -04:00
Derek Collison
29037a4f5c
Merge pull request #2554 from nats-io/issue-2551
...
[FIXED] #2551
2021-09-21 09:15:23 -07:00
Derek Collison
9534372113
Fix for #2551
...
When a mirror would be processed before the origin stream we would not recover the consumers due to failure on looking up source's subjects.
This change processes all streams first then does all consumers.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-21 08:53:12 -07:00
Derek Collison
052bb7ca54
Merge to fix conflicts
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-21 08:16:51 -07:00
Derek Collison
de851e513f
Fix for #2548
...
Replicated durable consumers that were backed by a memory store were bypassing snapshotting which also did compaction of the raft WAL.
This change adapts for memory store backed consumers by compacting the raft WAL directly on snapshot logic.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-21 08:02:11 -07:00
Derek Collison
63c242843c
Avoid panic if WAL was truncated out from underneath of us.
...
If we were leader stepdown as well.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-21 07:26:03 -07:00
Derek Collison
12bb46032c
Fix RAFT WAL repair.
...
When we stored a message in the raft layer in a wrong position (state corrupt), we would panic, leaving the message there.
On restart we would truncate the WAL and try to repair, but we truncated to the wrong index of the bad entry.
This change also includes additional changes to truncateWAL and also reduces the conditional for panic on storeMsg.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-20 18:41:37 -07:00
Matthias Hanel
cf6715bc19
Merge pull request #2539 from nats-io/reserved_memory
...
Exposing reserved memory in jsz/varz
2021-09-20 12:55:07 -04:00
R.I.Pienaar
3be0b23a3e
Merge pull request #2546 from ripienaar/negative_dupe_window_protection
...
protect against negative dupe window via negative max age
2021-09-20 18:09:19 +02:00
R.I.Pienaar
34b5a11e20
protect against negative dupe window via negative max age
...
Signed-off-by: R.I.Pienaar <rip@devco.net >
2021-09-20 17:34:48 +02:00
Derek Collison
c764da328c
Make sure to set last sequence on recovery, check for ddloaded on last msg id
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-20 07:11:15 -07:00
Derek Collison
edac5992b8
Bump version
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-19 14:02:00 -07:00
Derek Collison
cecb6246f2
Test tweaks
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-19 13:28:37 -07:00
Derek Collison
cfb69bbd1f
Only rebuild dedupe state as needed versus always on startup.
...
Was penalizing large non-dedupe streams on startup.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-19 13:27:26 -07:00
Derek Collison
08b498fbda
Log error on write errors
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-19 12:14:31 -07:00
Derek Collison
d79a00499d
Remove extra unlock that causes panics
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-19 12:13:37 -07:00
Derek Collison
4283358dcd
Improvments to writeIndexInfo logic and managing open FDs.
...
Also hold lock while doing sync and optionally close FDs if idle.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-19 11:45:16 -07:00
Derek Collison
7a4c904761
Improvements to cache management.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-18 15:21:12 -07:00
Matthias Hanel
5b9d20871d
Exposing reserved memory in jsz/varz
...
Signed-off-by: Matthias Hanel <mh@synadia.com >
2021-09-16 18:55:50 -04:00
Derek Collison
40a4d40337
Make large batch requests expire more efficiently.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-16 15:00:18 -07:00
Derek Collison
d91a0061ed
Fix for data race around c.echo
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-16 11:59:52 -07:00
Derek Collison
9918f16914
ConsumerInfo in clustered mode would return not found if assigned but not properly setup with a leader.
...
This change returns an info in those states now to better support client logic when binding consumers.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-16 10:56:34 -07:00
Ivan Kozlovic
47359c453e
Merge pull request #2533 from nats-io/js_cons_fc_hb
...
[CHANGED] JetStream: flow control requires heartbeats
2021-09-16 10:20:48 -06:00
Derek Collison
cfbc69b12c
Allow clustered JetStream to allow duplicate stream creation like single server mode.
...
Resolves #2528
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-15 20:18:44 -07:00
Ivan Kozlovic
ec774c9347
MQTT handle idempotent session stream creation.
...
Creating a stream will become idempotent, so assuming that we
should try to transfer the old session streams only on success
will no longer work.
Added a test that checks that "stream" list is queried only once
which means transfer was attempted only once after the second
cluster restart and new connection.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-15 10:15:45 -06:00
Ivan Kozlovic
108d4060ff
[CHANGED] JetStream: flow control requires heartbeats
...
The server will now reject the creation of a push consumer with
flow control if no heartbeat is set.
Resolves #2520
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-15 09:50:15 -06:00
Ivan Kozlovic
d6f9a06f05
Merge pull request #2530 from nats-io/mqtt_del_sess
...
MQTT: delete the session record even on restart with clean flag
2021-09-15 09:01:49 -06:00
R.I.Pienaar
6a5ac92eec
fix error code for JSStreamHeaderExceedsMaximumErr
...
Also checks for gaps in codes
Signed-off-by: R.I.Pienaar <rip@devco.net >
2021-09-15 09:01:03 +02:00
Derek Collison
765d39a2b6
Fix flapping test
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-14 17:47:14 -07:00
Ivan Kozlovic
4cc2677573
MQTT: delete the session record even on restart with clean flag
...
When a session record exists and is currently not connected, if
the user reconnects with the same client ID but with now the
clean flag set, we are required to clear the state. In earlier
implementation (where we were using a stream per session), we
were not deleting the stream to be created right away. Since now
we just have a message per session, it is ok to delete that
message when clearing the existing session that is going to be
replaced.
Also made apiDispatch execute in place for any connection that
is not ROUTER or GATEWAY.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-09-14 16:33:48 -06:00
Derek Collison
ebc581012e
Fixed a condition where JetStream assets could be created in multiple leafnodes.
...
Also added in optional Domain to StreamInfo.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-14 14:17:49 -07:00
Derek Collison
20574ffaad
Merge pull request #2526 from nats-io/issue-2525
...
[FIXED] #2525
2021-09-14 06:41:18 -07:00
Derek Collison
9cdab0682a
Bump version
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-13 18:41:12 -07:00
Derek Collison
4cfffc6fa6
We use u16 to encide header len when replicating JetStream messages.
...
Make sure to error if we exceed that limit.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-13 18:13:07 -07:00
Derek Collison
620b56e12f
During compaction the cache may not be loaded completely if msg block was lmb (active writing).
...
This could lead to the filtered subject state being incorrect.
Signed-off-by: Derek Collison <derek@nats.io >
2021-09-13 14:36:50 -07:00