Derek Collison
a301d3a892
Check direct consumers directly, stream state back to previous behavior
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-21 09:40:04 -07:00
Derek Collison
b5521053e6
Make sure to clean up ephemerals across a Gateway.
...
Also report direct consumers in num consumers in stream info.
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-21 08:47:55 -07:00
Derek Collison
ef7a811a71
Check that we have mirror still to not panic and deadlock/hang
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-20 16:41:41 -07:00
Derek Collison
5aa3dd7761
Put back direct consumer subject prefix
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-20 13:35:48 -07:00
Derek Collison
0a3e54c88a
Fix subscription leaks for mirrors and sources for streams as well as flow control subjects for consumers.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-20 12:13:07 -07:00
Derek Collison
68ddd519d2
Process upstream missing messages for mirrors better.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-19 20:15:21 -07:00
Derek Collison
7adf7bc7d6
Maintain stream sequence properly
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-18 18:38:28 -07:00
Derek Collison
d84af39f16
Make sure source consumers work properly after expiration/purge
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-16 17:28:04 -07:00
Derek Collison
60df8a2fcb
Minimize proposals doing skip msgs
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-16 14:19:29 -07:00
Derek Collison
f3f04e6442
Fix flapper
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-15 06:34:12 -07:00
Derek Collison
466789e307
Cleanup request subscription if no answer
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-14 15:04:22 -07:00
Derek Collison
395728bab9
Allow control messages like heartbeats to pass the old sub test.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-14 14:11:02 -07:00
Derek Collison
627d20f7d4
Make sure to stop retries for mirror consumers when not leader and through old control messages.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-14 10:43:55 -07:00
Derek Collison
f6a82a7c98
When messages were no longer available in an upstream stream a mirror could wedge and not resolve.
...
This fixes that scenario by detecting the situation and inserting skip msgs to catch up.
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-13 11:46:03 -07:00
Derek Collison
90989d57d6
Change to report total deleted by default for stream info.
...
Allow deleted details if requested.
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-12 18:10:11 -07:00
Derek Collison
2bea1f64f5
Merge pull request #2078 from nats-io/mirror_panic
...
If a mirror was removed or changed this would panic.
2021-04-07 14:26:56 -07:00
Derek Collison
114431bb3c
If a mirror config was removed the reference to mset.mirror.msgs would fail.
...
This protects against that.
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-07 10:59:05 -07:00
Derek Collison
c0e8590c0f
During startup each filtered consumer could do a linear scan of the stream
...
to determine number of messages pending. This improves that with a startup cache.
Signed-off-by: Derek Collison <derek@nats.io >
2021-04-07 09:15:01 -07:00
Derek Collison
5a48369b4b
Make sure to not delete streams on bad updates.
...
If an update was asssigned but failed at the stream group server we would send back the result which would always delete the stream.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-29 07:35:30 -07:00
Derek Collison
c05ff97d09
Fixes based on PR feedback
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-25 18:09:35 -07:00
Derek Collison
e53caee5e8
Enforce server limits even when dynamic limits for accounts in play.
...
We were not properly enforcing server limits. This commit will allow a server to enforce limits but still remain functional even at the JetStream level.
Also fixed a bug for RAFT replay that could cause instability.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-25 16:06:27 -07:00
Derek Collison
a627db9fc8
Do not request streaminfo from streams that are completely offline.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-24 10:26:09 -07:00
Derek Collison
2ed53035ed
Reworked flow control for sources and mirrors.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-24 07:07:33 -07:00
Derek Collison
022c5b4ab2
Fix for bad behavior with flow control and multiple sources streams.
...
Allow chaining of sources and mirrors with filtered consumers.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-22 11:13:51 -07:00
Derek Collison
a4119e13c1
Fix for new data race detected
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-20 17:46:59 -07:00
Derek Collison
0bcda04a9d
Send both last consumer and stream sequence for idle hb
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-20 16:57:13 -07:00
Derek Collison
2d46c112d6
Make sure to not interrupt flow control unless we miss.
...
Fix deadlock for mirrors.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-20 15:05:41 -07:00
Derek Collison
ced35e5b8c
Reworked sources and mirrors on missed data.
...
Add last delivered sequence to consumer idle heartbeats.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-20 14:03:46 -07:00
Derek Collison
4c6fd179d6
Can not use sub comparisons for old messages from direct consumers.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-20 10:30:09 -07:00
Derek Collison
cfe2f448ad
Fix for when gateways were dropped and we did not detect interest returning.
...
Fix for leaked subscription when retrying the source consumers.
Better suppression of old messages from old direct consumers.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-20 08:44:18 -07:00
Derek Collison
b00b723168
Mirrors were not properly retrying after failures to create their internal consumer.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-18 06:13:26 -07:00
Derek Collison
601dbf48c1
Protect against the stream nil'ing out the outq for the consumer
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-17 18:51:18 -07:00
Derek Collison
74cc2b581a
When a stream is a mirror or has sources we need to check the upstream streams for filter subject correctness.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-17 06:39:21 -07:00
Derek Collison
7ade99d102
Don't set to nil on stop to avoid any panics accessing that map.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-15 09:13:29 -07:00
Derek Collison
ee92cc9a5b
Properly print when a stream is doing out of band catchup. Print node banner consistently
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-14 07:29:36 -07:00
Derek Collison
299f44cddf
This changes our behaviors for streams and peer removals in several ways.
...
First we no longer try to auto-remap stream assignments on peer removals from the system.
We also now can always respond to stream info requests if at least a member is running.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-11 06:52:28 -05:00
Ivan Kozlovic
84fbcdcd34
Remove internal retries for mirrors and sources
...
We let the go routine do it.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-03-10 15:47:19 -07:00
Ivan Kozlovic
27f51d4028
Fix ephemeral consumer delete in single cluster
...
Also remove retry of sources/mirror in the setSourceConsumer() itself
when not getting a response.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-03-10 15:16:31 -07:00
Derek Collison
263f4452c3
Delete no longer needed
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-10 07:15:58 -05:00
Derek Collison
f95b6481d2
Make source and mirror consumers direct, meaning they are not mapped by the metaleader.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-10 07:12:48 -05:00
Ivan Kozlovic
52c4ab60f6
Merge pull request #1982 from nats-io/fix_idle_hbs_and_js_remote_unsubs
...
Fixed consumer idle hearbeats and JS route/GWs unsubscribes
2021-03-09 13:23:25 -07:00
Ivan Kozlovic
ccec4a6ab1
Fixed consumer idle hearbeats and JS route/GWs unsubscribes
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-03-09 12:08:47 -07:00
Waldemar Quevedo
86a64fbc46
Updates to JS consumer errors
...
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2021-03-09 09:46:28 -08:00
Derek Collison
ea9abc5ef8
Wait longer for response
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-09 05:41:00 -06:00
Derek Collison
e5e8205fac
Need to make sure order of clseq as stamped also make it to the propose chan.
...
However we do not want to hold the actual stream lock.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-09 00:34:33 -06:00
Ivan Kozlovic
57af977548
Stabilized stream sources under restart
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-03-08 16:41:02 -07:00
Derek Collison
467614ea87
Make sure to check for old messages during processsing.
...
Also changed the way we detect old messages.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-08 15:42:03 -06:00
Derek Collison
673543c180
Modified flow control for clustered mode.
...
Set channels into and out of RAFT layers to block.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-08 12:58:57 -06:00
Derek Collison
5fe9ba5e94
Switched to fast state
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-06 09:00:15 -08:00
Derek Collison
0b3c686430
Fixes for data races and some locking.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-05 17:19:51 -08:00