Commit Graph

5428 Commits

Author SHA1 Message Date
jnmoyne
7fa088c804 Adds deterministic subject tokens to partition mapping
introduces 'Moustache' style subject mapping format (e.g. foo.*.* -> foo.{{wildcard(1)}}.{{wildcard(2)}}.{{partition(10,1,2)}})
2022-03-01 17:04:49 -08:00
Ivan Kozlovic
1712ee3707 Merge pull request #2884 from nats-io/release_2_7_3
Release v2.7.3
2022-02-24 14:20:06 -07:00
Ivan Kozlovic
ab2b9f3fbf Release v2.7.3
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-02-24 13:32:53 -07:00
Ivan Kozlovic
0d6f303309 Bump version to v2.7.3-beta.3
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-02-23 17:00:29 -07:00
Ivan Kozlovic
3d313533e9 Merge pull request #2881 from nats-io/gw_auth_and_initial_ping
[FIXED] Gateway: connect could fail due to PING sent before CONNECT
2022-02-23 16:59:33 -07:00
Ivan Kozlovic
08d6aaa78f [FIXED] Gateway: connect could fail due to PING sent before CONNECT
When a gateway connection was created (either accepted or initiated)
the timer to fire the first PING was started at that time, which
means that for an outbound connection, if the INFO coming from
the other side was delayed, it was possible for the outbound to
send the PING protocol before the CONNECT, which would cause
the accepting side to close the connection due to a "parse" error
(since the CONNECT for an inbound is supposed to be the very
first protocol).

Also noticed that we were not setting the auth timer like we do
for the other type of connections. If authorization{timeout:<n>}
is not set, the default is 2 seconds.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-02-23 15:19:20 -07:00
Ivan Kozlovic
8a5912af31 Merge pull request #2879 from nats-io/some_updates
Various changes
2022-02-23 09:01:57 -07:00
Ivan Kozlovic
4f152ccdb8 Merge pull request #2880 from nats-io/update_deps
Update compress and highwayhash dependencies
2022-02-23 09:01:44 -07:00
Ivan Kozlovic
26a8dc8add Update compress and highwayhash dependencies
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-02-22 17:09:05 -07:00
Ivan Kozlovic
b7917e1d05 Various changes
- Limit IPQueue logging
- Add a rand per raft node. This is because in some situations when
running 3 servers at the same time, we would end-up with identical
inboxes for different subjects on the different nodes which would
cause panics
- Move the creation of internal subscriptions after the tracking
of the node and its peers.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-02-22 16:22:32 -07:00
jnmoyne
130b254699 Revert "Initial commit"
This reverts commit b10388c979.
2022-02-21 15:06:40 -08:00
jnmoyne
b10388c979 Initial commit 2022-02-19 23:57:30 -08:00
Derek Collison
58806c1290 Bump to 2.7.3-beta.2
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-17 12:41:30 -08:00
Derek Collison
2942d012f6 Merge pull request #2878 from nats-io/key_file_leak
Cleanup key files when removing message blocks.
2022-02-17 13:26:41 -07:00
Derek Collison
330a40009c Cleanup key files when removing message blocks.
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-17 11:33:41 -08:00
Derek Collison
255a7c3792 Merge pull request #2875 from nats-io/issue_2873
[FIXED] Interest policy and staggered filtered consumers could fail to remove messages.
2022-02-17 12:31:24 -07:00
Derek Collison
19b16df21b Merge pull request #2877 from nats-io/full_stream
Small improvements to send performance to a full stream.
2022-02-17 11:43:21 -07:00
Derek Collison
4efce40bbd Small improvements to send performance to a full stream.
Cleaned up some locking and if fifo make index updates lazy like writeMsgRecord.

Signed-off-by: Derek Collison <derek@nats.io>
2022-02-17 05:39:27 -08:00
Derek Collison
1c8f7de848 On filtered subjects when consumers were staggered we need to disqualify a filtered consumer if not applicable.
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-16 18:24:27 -08:00
Derek Collison
ea20cb4cb7 Merge pull request #2871 from nats-io/tag_placement
Allow stream placement by tags.
2022-02-15 18:14:55 -07:00
Derek Collison
ca1132a01d Allow stream placement by tags.
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-15 17:07:32 -08:00
Derek Collison
ae9bb19d66 Merge pull request #2867 from nats-io/replica_updates
Allow replica updates during stream update.
2022-02-14 09:53:54 -08:00
Derek Collison
fb15dfd9b7 Allow replica updates during stream update.
Also add in HAAssets count to Jsz.

Signed-off-by: Derek Collison <derek@nats.io>
2022-02-13 19:33:46 -08:00
Derek Collison
7f985e350c Merge pull request #2865 from nats-io/pull_consumer_hb
Allow pull requests to specify a heartbeat
2022-02-11 11:18:02 -08:00
Derek Collison
5a93b0e9d8 Allow pull requests to specify a heartbeat when idle to detect when a request is invalidated.
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-11 09:51:51 -08:00
Derek Collison
c0dafb1d05 Merge pull request #2864 from ripienaar/npe_restore_failure
avoid seg fault when stream restore fails
2022-02-11 06:49:34 -08:00
R.I.Pienaar
6bb0861eb7 avoid seg fault when stream restore fails
Signed-off-by: R.I.Pienaar <rip@devco.net>
2022-02-11 10:45:09 +01:00
Ivan Kozlovic
4aaf76e20d Merge pull request #2863 from nats-io/fix_cons_dc_count
Fixed consumer dlv count and num pending wrong due to redeliveries
2022-02-10 18:24:51 -07:00
Ivan Kozlovic
55ffde7251 Fixed consumer dlv count and num pending wrong due to redeliveries
Introduced by #2848, so should not have impacted existing releases.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-02-10 17:33:53 -07:00
Derek Collison
9010f3542a Bump to 2.7.3-beta
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-09 17:36:15 -08:00
Derek Collison
6fcd87935c Merge pull request #2859 from nats-io/fss_cleanup
Remove fss files from a snapshot when a block is removed.
2022-02-09 17:33:29 -08:00
Derek Collison
68104d7cf3 During a filestore snapshot we generate the fss files but were not cleaning them up if the block was deleted before a server restart.
https://gist.github.com/nekufa/010185dfb59261f222a0042d3a7d2a1c

Signed-off-by: Derek Collison <derek@nats.io>
2022-02-09 17:12:08 -08:00
Derek Collison
ecfe42630a Merge pull request #2858 from nats-io/add_consumer_with_info
Make sure we snapshot initial consumer info during consumer creation.
2022-02-09 17:05:01 -08:00
Derek Collison
da9046b2e6 Snapshot initial consumer info when needed.
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-09 15:23:53 -08:00
Derek Collison
096f5e5249 Merge pull request #2857 from nats-io/issue_2850
A stream name is tied to its identity and can not be changed on a restore.
2022-02-09 13:09:04 -08:00
Derek Collison
0cc7302be9 A stream name is tied to its identity and can not be changed on a restore.
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-09 12:38:45 -08:00
Derek Collison
3fe94b1a70 Merge pull request #2856 from nats-io/jsdir
Removed JetStream directory
2022-02-09 08:58:06 -08:00
Derek Collison
0659cd6692 Removed JetStream directory
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-09 08:32:49 -08:00
Ivan Kozlovic
3dcf0246c6 [FIXED] Adding a consumer could return inaccurate consumer info
The issue is that the consumer info returned by the consumer create
API is gathered after the consumer is added and possibly after
starting to deliver pending messages.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-02-09 09:04:16 -07:00
Derek Collison
e997252b9a Merge pull request #2848 from nats-io/sparse_consumers
Improved sparse consumers replay time.
2022-02-08 14:44:12 -08:00
Derek Collison
c13a84cf44 Fixed a bug that would calculate the first sequence of a filteredPending incorrectly.
Also added in more optimized version to select the first matching message in a message block for LoadNextMsg.

Signed-off-by: Derek Collison <derek@nats.io>
2022-02-08 13:29:38 -08:00
Derek Collison
d50febeeff Improved sparse consumers replay time.
When a stream has multiple subjects and a consumer filters the stream to a small and spread out list of messages the logic would do a linear scan looking for the next message for the filtered consumer.
This CL allows the store layer to utilize the per subject info to improve the times.

Signed-off-by: Derek Collison <derek@nats.io>
2022-02-07 17:26:32 -08:00
Derek Collison
d71bb63e1b Merge pull request #2847 from nats-io/fc_stall
Fixed flow control stall under specific conditions of message size.
2022-02-07 09:28:17 -08:00
Derek Collison
55b7f11c9a Fixed flow control stall under specific conditions of message size.
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-05 20:15:48 -08:00
Ivan Kozlovic
135475babb Merge pull request #2841 from nats-io/release_2_7_2
Release v2.7.2
2022-02-04 14:56:58 -07:00
Ivan Kozlovic
6d92051696 Release v2.7.2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-02-04 14:49:39 -07:00
Derek Collison
664e8b92b6 Merge pull request #2840 from nats-io/dyn_acc
Remove dynamic account behaviors.
2022-02-04 13:36:54 -08:00
Derek Collison
a0a2e32185 Remove dynamic account behaviors.
We used these in tests and for experimenting with sandboxed environments like the demo network.

Signed-off-by: Derek Collison <derek@nats.io>
2022-02-04 13:32:18 -08:00
Derek Collison
d3f78deaaf Merge pull request #2833 from nats-io/si_subjects
Added in ability to get per subject details via StreamInfo.
2022-02-02 09:13:32 -08:00
Derek Collison
5da0453964 Add in NumSubjects to StreamInfo
Signed-off-by: Derek Collison <derek@nats.io>
2022-02-02 08:51:13 -08:00