Commit Graph

3077 Commits

Author SHA1 Message Date
Derek Collison
6bd565c58a We had a situation where when a stream with interest retention had a clustered consumer it could cause the server to panic when the consumer was being deleted.
Signed-off-by: Derek Collison <derek@nats.io>
2021-07-28 15:10:21 -07:00
Derek Collison
c3ba9f03f5 Merge pull request #2377 from nats-io/desc
Add descriptions to JetStream streams and consumers.
2021-07-28 06:43:58 -07:00
Matthias Hanel
d89aa258d1 [fixed] crash in unit test caused by *ConsumerStore.State() return nil, nil
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-27 19:15:09 -04:00
Matthias Hanel
a40ea298e5 [fixed] jetstream unique server name requirement across domains (#2378)
* [fixed] jetstream unique server name requirement across domains

including domain in server info
adding check for cluster name in duplicate leaf node connection check

This does not address non unique domains in the same domain, say within
super cluster.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-27 18:42:19 -04:00
Derek Collison
98970ac03d Add descriptions to JetStream streams and consumers. 2021-07-27 14:05:25 -07:00
R.I.Pienaar
24584a0b4a fix error replacements in consumer validation
Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-07-27 18:17:07 +02:00
Derek Collison
f13fa767c2 Remove the swapping of accounts during processing of service imports.
When processing service imports we would swap out the accounts during processing.
With the addition of internal subscriptions and internal clients publishing in JetStream we had an issue with the wrong account being used.
This was specific to delyaed pull subscribers trying to unsubscribe due to max of 1 while other JetStream API calls were running concurrently.
2021-07-26 07:57:10 -07:00
AdamKorcz
278d42900a Change naming in server fuzzer 2021-07-23 10:19:07 +01:00
Matthias Hanel
ccef1bf327 Remove unnecessary lines
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-22 18:53:06 -04:00
Matthias Hanel
0a33f040e9 fix performance by changing signature of tokenizeSubjectIntoSlice
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-22 16:46:57 -04:00
Matthias Hanel
06ac80cdbe Review comments
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-22 11:27:34 -04:00
Matthias Hanel
ddd665b036 [fixed] subscription on wildcard import that is not a subset
fixes #2361
The subject used was not a subset of the import. Nor the other way
around. Instead it is an overlap that needs to be dynamically computed.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-22 09:52:12 -04:00
Matthias Hanel
84e7fab33b [changed] default account fetch timeout to be smaller as client timeout
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-19 12:22:07 -04:00
Matthias Hanel
1d4243b565 [fixed] tls timeout now accepts units
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-19 11:42:28 -04:00
Ivan Kozlovic
a7e0eeaf50 Removed debug.PrintStack() from apiDispatch [ci skip]
It was introduced by mistake in PR #2324 which I had reported
but failed to be actually removed before PR was merged:
https://github.com/nats-io/nats-server/pull/2324#pullrequestreview-695163635

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-07-13 16:49:44 -06:00
Derek Collison
16b4206a39 Bump to 2.3.3 beta
Signed-off-by: Derek Collison <derek@nats.io>
2021-07-11 10:47:02 -07:00
Derek Collison
225df04662 Fix for a consumer's num pending being stuck at 1.
We were trying to protect the sgap uint64 from wrapping, but in some cases the consumers is eager and can get a message before we sgap++.
Instead of slowing things down and sycnhronizing ++ then --, we allow it to wrap temporarily and have and adjustedPending() func that will set to zero for reporting.

Signed-off-by: Derek Collison <derek@nats.io>
2021-07-10 12:37:08 -07:00
R.I.Pienaar
359a4d980b remove duplicate error
Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-07-10 11:46:37 -07:00
Ivan Kozlovic
670be37646 Merge pull request #2341 from gogrlx/main
[ADDED] ReloadOptions() for embedded cases
2021-07-08 10:24:03 -06:00
Derek Collison
f441c7bc8d Merge pull request #2354 from nats-io/maxcc
Fix for multiple concurrent ephemeral consumer requests with max consumers set.
2021-07-08 08:53:51 -07:00
Derek Collison
065049e090 Fix for flapper
Signed-off-by: Derek Collison <derek@nats.io>
2021-07-08 07:42:40 -07:00
Derek Collison
6337198119 Fix for multiple concurrent ephemeral consumer requests in clustered mode with max consumers set.
Signed-off-by: Derek Collison <derek@nats.io>
2021-07-08 07:02:09 -07:00
Derek Collison
894f26d149 Fix for #2352
Signed-off-by: Derek Collison <derek@nats.io>
2021-07-08 06:13:36 -07:00
Matthias Hanel
c68ffe5ad5 [adding] kind and client_type to account connect/disconnect events (#2351)
* [adding] kind and client_type to client info. specifically account connect/disconnect events

Kind is Client/Leafnode but can take the value of Router/Gateway/JetStream/Account/System in the future.
When kind is Client, then client_type is set to mqtt/websocket/nats
This fixes #2291

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-07 17:43:50 -04:00
0e04effaed Adds public ReloadOptions api support
Refactor Reload to call ReloadOptions
2021-07-07 09:57:35 -07:00
Ivan Kozlovic
988d12b24a Release v2.3.2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-07-06 15:05:19 -06:00
Matthias Hanel
fcb3382f4b [fixed] CONNS system endpoint which had issues with header and empty msg
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-06 16:46:36 -04:00
Ivan Kozlovic
315e658a5f Merge pull request #2347 from nats-io/econsumer
Make requirement for interest on creation of ephemerals soft vs hard.
2021-07-06 14:44:11 -06:00
Ivan Kozlovic
b582b13a96 Fixed another flapper
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-07-06 14:20:16 -06:00
Ivan Kozlovic
df3eccbd69 Fix yet another flapper
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-07-06 13:55:28 -06:00
Ivan Kozlovic
710d0c3a1f Fixed another flapper
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-07-06 12:44:08 -06:00
Ivan Kozlovic
d5f5a74438 Fixed some tests
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-07-06 12:20:03 -06:00
Derek Collison
57cfba0964 Make requirement for interest on creation of ephemerals soft vs hard.
Will start the cleanup timer if no interest but allow creation.

Signed-off-by: Derek Collison <derek@nats.io>
2021-07-06 10:48:07 -07:00
Derek Collison
6eef31c0fc Fixed peer info reports that had large last active values.
Also put in safety for lag going upside down as well.

Signed-off-by: Derek Collison <derek@nats.io>
2021-07-06 10:14:43 -07:00
Derek Collison
960c45df81 Use of sync.Pool for filestore could cause msg corruption.
Signed-off-by: Derek Collison <derek@nats.io>
2021-07-06 08:41:01 -07:00
R.I.Pienaar
709e256d64 Add error codes for all consumer creation errors
I wanted to supress some logging of consumer create
errors that just isn't needed and would be really
annoying on large networks, so I added many constants
and updated all errors.

I think only JSConsumerStoreFailedErrF is worth logging
on large networks else there would be quite a lot of
logs generated that one just cannot act on

Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-07-06 14:51:03 +02:00
Matthias Hanel
dc27c360aa Merge pull request #2338 from nats-io/sys-export
[fixed] header handling in system services
2021-07-01 19:15:24 -04:00
Matthias Hanel
a72ca8a9bf [fixed] header handling in system services
On export/import a header was inserted which broke parsing of the
message.
Fixed unit test broken by .beta in version

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-07-01 19:00:52 -04:00
Ivan Kozlovic
4e6fe87c06 Fix version
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-07-01 16:55:00 -06:00
Derek Collison
9b73fae5bd We should not sit in place here, no measurable effect on latency in tests
Signed-off-by: Derek Collison <derek@nats.io>
2021-07-01 14:29:09 -07:00
Derek Collison
fd9e9480da Merge pull request #2333 from nats-io/srace
Check not really needed here, so removed
2021-07-01 06:19:46 -07:00
Derek Collison
ad4685c84f Fix for crash in test run
Signed-off-by: Derek Collison <derek@nats.io>
2021-06-30 19:30:37 -07:00
Derek Collison
c2c146c9f2 Fix for #2329.
When we created a filestore we would figure out if we should track by subject based on stream config.
This would cause bad results when a stream was updated to multiple subjects or wildcards.
This change tightens when and what we track but turns it on all the time now.

Signed-off-by: Derek Collison <derek@nats.io>
2021-06-30 19:10:31 -07:00
Derek Collison
617f061084 Check not really needed here, so removed
Signed-off-by: Derek Collison <derek@nats.io>
2021-06-30 15:08:56 -07:00
Ivan Kozlovic
13334c227d Release v2.3.1
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-06-29 13:51:32 -06:00
Derek Collison
35f6be2056 If dirty flag set always write state out
Signed-off-by: Derek Collison <derek@nats.io>
2021-06-29 12:25:28 -07:00
Derek Collison
a78f155733 2.3.1-RC.1
Signed-off-by: Derek Collison <derek@nats.io>
2021-06-29 08:36:00 -07:00
Derek Collison
26e63a14a6 Merge pull request #2324 from nats-io/large-r1
Improvements to large numbers of JetStream R1 consumers per stream.
2021-06-29 08:35:17 -07:00
Derek Collison
3c16f776dc Protect account prand, use faster Uint64 variant
Signed-off-by: Derek Collison <derek@nats.io>
2021-06-29 06:13:41 -07:00
Derek Collison
99fed910f0 Improvements to large numbers of JetStream R1 consumers per stream.
1. We were holding open FDs longer than we should for consumers causing issues with open FD limits. We now do not hold them open and cap updates a bit better.

2. When doing a stream delete, consumer delete was repeating alot of work that was not necessary, causing longer delays. This has been optimized a bit, still more improvements to be made.

3. We cover all JS under a single export, but that was also trapping GetNext for pull based consumers, and since this was a no-op (is handled at user account level) we were creating alot of garbage service import responses and reverse map entries that had to be garbage collected. We have a fix in to avoind this but still looking for a better one.

4. Still had some lingering references to all exports vs single JS export.

Signed-off-by: Derek Collison <derek@nats.io>
2021-06-29 05:45:55 -07:00