Commit Graph

4902 Commits

Author SHA1 Message Date
Waldemar Quevedo
45beab1f17 Fix typo from internal function (#4337)
minor internal typo fix
2023-07-25 06:56:23 -07:00
Derek Collison
0421c65c88 Bump to 2.9.21-RC.1
Signed-off-by: Derek Collison <derek@nats.io>
2023-07-23 14:58:52 -07:00
Waldemar Quevedo
bbfeb2a887 Fix typo on internal function
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-07-22 20:40:26 -07:00
Byron Ruth
905f040d86 Change logtime_utc default to false
This ensures that the existing, default behavior of the server emitting the local timezone is not changed.
2023-07-21 16:57:12 -07:00
Neil Twigg
e88517c90e Add logtime_utc option
backport to main: https://github.com/nats-io/nats-server/pull/3833

Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-07-21 16:56:13 -07:00
Derek Collison
ba517e4bfb [FIXED] Leaking memory on usage of getHash() (#4329)
If we created lots of hashes, beyond server names, like for consumer or
stream NRG group names etc, these maps would grow and not release
memory. Performance hit is ~300ns per call, and we can use string intern
trick if need be at a future date since it is GC friendly.

Signed-off-by: Derek Collison <derek@nats.io>

Resolves #4289
2023-07-20 16:04:18 -07:00
Derek Collison
b68aed90d3 If we created lots of hashes, beyond server names, like for consumer or stream NRG groups etc, the maps would grow and not release memory.
In the benchmark on my machine, this added ~300ns per call, but I think that is ok for now vs the memory usage.

Signed-off-by: Derek Collison <derek@nats.io>
2023-07-20 15:11:28 -07:00
Derek Collison
9280a552b8 Don't error to server logs if message deleted
Signed-off-by: Derek Collison <derek@nats.io>
2023-07-20 14:07:35 -07:00
Derek Collison
6c9fb6a938 [FIXED] Server reload with highly active accounts with service imports could cause panic or dataloss (#4327)
When service imports were reloaded on active accounts with lots of
traffic the server could panic or lose data.

Signed-off-by: Derek Collison <derek@nats.io>
2023-07-20 13:19:17 -07:00
Derek Collison
7477ce8257 When service imports were reloaded on active accounts with lots of traffic the server could panic or lose data.
Signed-off-by: Derek Collison <derek@nats.io>
2023-07-20 12:20:50 -07:00
Caleb Lloyd
7993547bee Adjust in-process server info tls_required to tls_available
Signed-off-by: Caleb Lloyd <caleb@synadia.com>
2023-07-20 10:44:03 +01:00
Neil Twigg
ed9fafc796 Don't require TLS for in-process connection
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-20 10:43:58 +01:00
Derek Collison
244dda809c Fix bug that would race around check for last sequence per subject
Signed-off-by: Derek Collison <derek@nats.io>
2023-07-18 11:29:59 -07:00
Derek Collison
360f807cef Moved to end for merge with other branches, minor changes
Signed-off-by: Derek Collison <derek@nats.io>
2023-07-18 11:29:26 -07:00
Byron Ruth
e7bf1b3132 Add test case for concurrent expected last subject sequence
Signed-off-by: Byron Ruth <byron@nats.io>
2023-07-18 11:10:51 -04:00
Waldemar Quevedo
c1750b8a54 De-flake a few tests (#4311)
This should hopefully make a small handful of tests less flakey.

Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-14 09:57:23 -07:00
Neil Twigg
2527e11304 Increase threshold in TestNoRaceJetStreamSlowFilteredInititalPendingAndFirstMsg
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-14 17:05:26 +01:00
Neil Twigg
6cdb0c7838 Wait for current in TestJetStreamClusterStreamUpdateSyncBug so in-flight state changes aren't lost
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-14 17:03:21 +01:00
Neil Twigg
abb47c9554 Only send one message in TestJetStreamRedeliverCount to prevent out-of-order redeliveries
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-14 16:56:01 +01:00
Neil Twigg
144abc0dd9 Make TestJetStreamAccountImportJSAdvisoriesAsService insensitive to event order
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-14 16:51:51 +01:00
Neil Twigg
b58204cff7 Use checkFor in TestJetStreamMsgHeaders
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-14 16:44:24 +01:00
Neil Twigg
979b265e26 Tweak timing in TestJetStreamClusterDeleteConsumerWhileServerDown
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-14 16:44:15 +01:00
Neil Twigg
81dd129043 Move assigned ports out of ephemeral range
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-14 15:08:17 +01:00
Neil Twigg
586717a3c0 Remap ports in leaf node tests to hopefully reduce flakes
Multiple tests were using the same port numbers and it seems that the
NATS Servers were not always shutting down quickly enough, resulting
in `listen tcp 127.0.0.1:50554: bind: address already in use` failures.

Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-14 13:49:15 +01:00
Byron Ruth
63864490a5 Bump v2.9.21-beta
Signed-off-by: Byron Ruth <byron@nats.io>
2023-07-13 16:04:11 -04:00
Byron Ruth
b055f675ba Release v2.9.20 2023-07-13 15:29:30 -04:00
Derek Collison
1f39d744dd Only discard messages from MQTT QoS0 from internal jetstream clients if really a QoS1 jetstream publish.
Signed-off-by: Derek Collison <derek@nats.io>
2023-07-12 16:00:59 -07:00
Derek Collison
0c8552cd34 Evaluate service imports when publishing advisories (#4302)
This should fix #4275 by allowing advisories to be copied into other
accounts via service imports.

Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-12 12:24:00 -07:00
Neil Twigg
1434ee7da8 More specific check for service imports vs any internal sub
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-12 19:52:31 +01:00
Neil Twigg
fbbbe28278 Evaluate service imports when publishing advisories
Signed-off-by: Neil Twigg <neil@nats.io>
2023-07-12 18:18:57 +01:00
Piotr Piotrowski
e3b132ae34 Test for gathering JS advisories from multiple accounts on a single account
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-07-12 13:26:18 +01:00
Derek Collison
9e9a9a082b When restoring a filestore with no key generator but it was encrypted, fail to restore.
Signed-off-by: Derek Collison <derek@nats.io>
2023-07-11 16:27:50 -07:00
Derek Collison
5390272074 Bump to 2.9.20-beta
Signed-off-by: Derek Collison <derek@nats.io>
2023-07-11 14:29:17 -07:00
Derek Collison
353d543c16 When a queue subscriber was updated multiple times over a leafnode connection we added in more shadow subscriptions which could become zombies when the connection went away.
In a case where a leafnode server had multiple queue subscribers on the same queue group, the hub server would add in multiple shadow subs. These subs would not be properly cleaned up and could lead to stale connections being associated with them.

Signed-off-by: Derek Collison <derek@nats.io>
2023-07-10 21:03:47 -07:00
Derek Collison
eb2aa352ec Updated Leafnode Test (#4283)
Signed-off-by: Derek Collison <derek@nats.io>
2023-06-30 11:06:11 -07:00
Derek Collison
b207984a84 Made cloud clusters 5 nodes each
Signed-off-by: Derek Collison <derek@nats.io>
2023-06-30 10:12:39 -07:00
Neil Twigg
0d1c666071 Add TestRouteNoLeakOnSlowConsumer and TestRouteNoLeakOnAuthTimeout
Signed-off-by: Neil Twigg <neil@nats.io>
2023-06-30 13:11:42 +01:00
Derek Collison
e31bf5c66d Added reverse flow to the mc leafnode test
Signed-off-by: Derek Collison <derek@nats.io>
2023-06-29 16:10:31 -07:00
Derek Collison
a2b9ee9123 Shorten stream size for travis
Signed-off-by: Derek Collison <derek@nats.io>
2023-06-28 15:56:41 -07:00
Derek Collison
1bb1a3cae1 Do not health check streams that are actively being restored.
Could leave them in a bad state.

Signed-off-by: Derek Collison <derek@nats.io>
2023-06-28 15:27:45 -07:00
Derek Collison
9805101953 Use an account protected method to check for service imports to avoid data race when reloading accounts.
Signed-off-by: Derek Collison <derek@nats.io>
2023-06-27 19:52:43 -07:00
Derek Collison
855e1bb14e Allow more tolerance for travis
Signed-off-by: Derek Collison <derek@nats.io>
2023-06-23 14:24:00 -07:00
Derek Collison
2b2e22ed52 When creating a consumer on a stream with a very large number of msg blks, calculating numPending could be slow.
This aims to optimize a bit, more work to be done on streams with a very large (> 200k) number of msg blks.

Signed-off-by: Derek Collison <derek@nats.io>
2023-06-23 14:11:56 -07:00
Todd Beets
f854e95c11 Cert Store (aka wincert) 2023-06-22 12:25:54 -07:00
Derek Collison
031535b89d Add object store benchmark (#4220)
- [ ] Link to issue, e.g. `Resolves #NNN`
 - [ ] Documentation added (if applicable)
 - [x] Tests added
- [x] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [x] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
 - [x] Build is green in Travis CI
- [x] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)

### Changes proposed in this pull request:
 - New benchmark for NATS JetStream Object Store
2023-06-21 14:36:35 -07:00
reubenninan
13e09f2db4 Add benchmarks for object store
Signed-off-by: reubenninan <reuben@nats.io>
2023-06-21 16:05:30 -04:00
Neil Twigg
cf715845d1 Additional check for TLS required in WebSocket INFO
Signed-off-by: Neil Twigg <neil@nats.io>
2023-06-21 19:06:49 +01:00
Byron Ruth
9592b760b9 Release v2.9.19
Signed-off-by: Byron Ruth <byron@nats.io>
2023-06-20 10:55:31 -04:00
Neil Twigg
afdc2478ca WebSocket-specific INFO
This fixes #4252 by ensuring that `tls_available`, `tls_required`, `host` and `port`
are populated based on the WebSocket listener rather than standard listeners.

Signed-off-by: Neil Twigg <neil@nats.io>
2023-06-20 11:47:09 +01:00
Neil Twigg
e879a9fa0c Test MaxMsgs and MaxMsgsPer in combination
Signed-off-by: Neil Twigg <neil@nats.io>
2023-06-19 09:45:17 +01:00