Derek Collison
4d15658ec2
Merge pull request #1996 from nats-io/updates
...
JSC Updates
2021-03-14 17:17:08 -07:00
Derek Collison
0425056c33
Fix deadlock
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-14 05:38:25 -07:00
Derek Collison
10afedcc46
Check in initial pending if our filtered subject directly matches our stream config.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-13 19:59:21 -08:00
Ivan Kozlovic
5edb8b1105
Clear timer in case currently set
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-03-13 14:59:38 -07:00
Ivan Kozlovic
9e858ff81f
Ephemeral cleanup across GWs
...
Watch for interest loss across GWs so ephemeral consumers are removed
when there is no longer local and GW interest.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-03-13 14:11:34 -07:00
Derek Collison
c783bf1bed
Tweak flow control and slow start
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-10 17:30:25 -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
Waldemar Quevedo
86a64fbc46
Updates to JS consumer errors
...
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2021-03-09 09:46:28 -08:00
Waldemar Quevedo
5656ce5ace
Merge pull request #1958 from nats-io/consumer-ack-pending-pull
...
Prevent pull batch larger than max ack pending
2021-03-09 07:50:01 -08:00
Ivan Kozlovic
4d1fc3a449
Merge pull request #1974 from nats-io/pae
...
Memory cache for commits and WAL size constraints.
2021-03-08 16:43:20 -07: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
Waldemar Quevedo
3e61c2e5b1
Prevent pull batch size larger than max ack pending
...
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2021-03-08 08:55:47 -08:00
Waldemar Quevedo
278c0efc8a
Fix check from next request msg
...
Signed-off-by: Waldemar Quevedo <wally@synadia.com >
2021-03-07 00:12:31 -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
Derek Collison
ff98984358
Reworked internal consumers used for sources and mirrors.
...
Now use ephemerals and heartbeats and flowcontrol.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-05 14:32:57 -08:00
Derek Collison
75b0455e0b
Enable opt-in flow control for push based consumers.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-05 08:48:12 -08:00
Derek Collison
955594ce9d
Use code 100 instead
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-05 05:57:50 -08:00
Derek Collison
7e2b2a1033
Allow an option to push based consumers to have idle heartbeats delivered.
...
This allows an endpoint to know the consumer is still alive.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-05 05:48:00 -08:00
Derek Collison
4bfd6485f6
Can't remove based on interest directly
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-04 19:11:24 -08:00
Derek Collison
4cdfb0ab6e
Don't need to release locks now with outq. Also borrow once
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-04 17:58:01 -08:00
Derek Collison
207ebd3b3d
Changed stream sendq to linked list outq.
...
Made consumer share streams outq.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-04 17:19:50 -08:00
Derek Collison
86d12b903d
Fixed leaking info sub
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-03 20:06:35 -08:00
Derek Collison
32ffb55a22
Provide feedback to users when trying to pull from a push based consumer.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-03 09:17:27 -08:00
Derek Collison
b7cf49949e
For large redeliver queues linear search was not good, so added index.
...
Also set to nil when drained to avoind holding onto large underlying arrays.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-03 07:29:59 -08:00
Derek Collison
e4d458c3f8
Make consumer processing of next message not inline if non client connection.
...
Also fixed a bug with processing ack floors.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-03 06:52:56 -08:00
Derek Collison
e1f7440361
Revert to previous, will redo out of band version
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-02 20:18:21 -08:00
Derek Collison
43b9017b74
Merge pull request #1953 from nats-io/api
...
JetStream API Changes
2021-03-02 19:46:00 -07:00
Derek Collison
b9498b8c0e
Need to return
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-02 18:38:05 -08:00
Matthias Hanel
c50ee2a1c6
[Changed] all times exposed will be computed in UTC ( #1943 )
...
This also applies to times that end up in that json.
Where applicable moved time.Now() to where it is used.
Moved calls to .UTC() to where time is created it that time is converted
later anyway.
Signed-off-by: Matthias Hanel <mh@synadia.com >
2021-03-02 21:37:42 -05:00
Derek Collison
df02e0be71
Consumers would process next message batches inline.
...
In clustered mode this could block a route or gateway processor.
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-02 18:28:17 -08:00
Derek Collison
27090975d9
Fix for leaked subs on non-leader change
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-03-02 07:19:18 -08:00
Derek Collison
b9e1a921ff
Use internal wildcard inbox for stream and consumer info requests.
...
More gateway friendly but suffers from no echo, so added new client based internal send.
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-28 10:01:01 -08:00
Derek Collison
6a03ab9629
Inline flow in clustered mode was flaky, removed that path.
...
Changed up accounting.
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-28 05:11:59 -08:00
Matthias Hanel
c73d3b21eb
changing NEXT expires field from time to duration in nanoseconds
...
Signed-off-by: Matthias Hanel <mh@synadia.com >
2021-02-26 20:45:44 -05:00
R.I.Pienaar
45a42864f6
always store the filter subject
...
This avoids a situation where a consumer asks for
ORDERS.new today on a stream of ORDERS.new but later
someone makes the same stream ORDERS.* and the new
consumer would then get messages for other purposes
as well
Signed-off-by: R.I.Pienaar <rip@devco.net >
2021-02-25 18:29:21 +01:00
Derek Collison
78bdc34637
General stability improvements. Fixes to subscription state not cleaning up.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-24 08:44:34 -08:00
Derek Collison
dd19f620a9
Does not need receiver
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-23 10:57:18 -08:00
Ivan Kozlovic
61bd1b8d86
MQTT clustering
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-02-19 08:50:00 -07:00
Derek Collison
afea79610a
Consumer interest was not properly handled cross cluster.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-18 18:29:59 -08:00
Derek Collison
e21c7097f3
General stability improvements.
...
Original thought to move to memory based WALs was ill-advised and caused issues with stability around restarts.
Returned to file based but with async flush for the WAL itself.
Also the raft inline catchup has been improved.
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-17 19:56:16 -08:00
Derek Collison
5ef4d138cb
Interest based retention did not work correctly with wildcards or multiple subjects and filtered consumers.
...
This allows that to work properly, needed for MQTT.
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-11 20:59:20 -08:00
Derek Collison
d70ae1fb97
Fix for interest policy based retention for streams in clusters.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-11 18:52:37 -08:00
Derek Collison
fa8a95a06a
Improved snapshots and compactions.
...
Various bug fixes and stability improvements.
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-11 11:16:00 -08:00
Derek Collison
c16f6e193d
Move JetStream direct APIs to private.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-07 15:19:22 -08:00
Derek Collison
6d32c307ef
Remove pretty indent for json.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-06 20:09:44 -08:00
Matthias Hanel
7b7543d298
[added] jsz nats and http monitoring endpoint for jetstream ( #1881 )
...
The new endpoints are /jsz on http and "$SYS.REQ.SERVER.PING.JSZ" and "$SYS.REQ.SERVER.%s.JSZ".
$SYS.REQ.ACCOUNT.%s.JSZ will only return info for the particular account
Signed-off-by: Matthias Hanel <mh@synadia.com >
2021-02-05 18:46:04 -05:00
Ivan Kozlovic
6eeb9d2361
Fixed some issues with JS consumers
...
- Should check if there is interest at top of deleteNotActive timer
callback.
- Use RLock/RUnlock for no interest check
- Remove some checks in cluster mode regarding internal stream/consumers
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-02-03 20:12:06 -07:00
Derek Collison
e5c1d65fff
Added in JS disable per server on reload. Also removing peerw from a stream and leader stepdown for streams and consumers.
...
Various bug fixes, stability improvments.
Signed-off-by: Derek Collison <derek@nats.io >
2021-02-01 19:39:08 -08:00
Derek Collison
095a83bc2a
Make sure to suppress duplicate create/delete audit events
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-01-31 09:16:16 -08:00
Derek Collison
d2a92221fb
Duplicate leader elect and lost advisories to the system account as well.
...
Also suppress lost quorums to at most once every 10 secs.
Signed-off-by: Derek Collison <derek@nats.io >
2021-01-29 08:51:20 -08:00