Derek Collison
292e42d528
Better fix for flapping test - TestJetStreamClusterStaleReadsOnRestart ( #4516 )
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-12 08:32:16 -07:00
Derek Collison
0308cbb372
Fix for spelling
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-12 07:52:17 -07:00
Derek Collison
3f80348a16
Fix for data race in accessing rg.node
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-12 07:43:14 -07:00
Neil
d5fe492a5a
Allow more time in TestFileStoreNumPendingLargeNumBlks ( #4515 )
...
This should hopefully de-flake `TestFileStoreNumPendingLargeNumBlks` a
bit. By adding a new `require_LessThan` helper function, we also will
produce a more meaningful log line that tells us what the bad values
were if the test fails.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-12 15:08:53 +01:00
Derek Collison
8e2c30a75b
Better fix for flapping test
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-12 06:54:36 -07:00
Neil Twigg
3becc840d9
Allow more time in TestFileStoreNumPendingLargeNumBlks, improve logging on failure
...
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-12 11:02:43 +01:00
Derek Collison
3fea204ba6
[FIXED] Allow time for the 3rd replica to be current - TestJetStreamClusterStaleReadsOnRestart ( #4513 )
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-11 22:19:01 -07:00
Derek Collison
eed5fd8a73
Allow time for the 3rd replica to be current
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-11 21:54:58 -07:00
Derek Collison
e72bb957fd
[FIXED] Data race accessing mirror tr ( #4512 )
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-11 21:31:47 -07:00
Derek Collison
573087d1b8
[FIXED] Need a flush to make sure 2nd INFO processed ( #4511 )
...
Fix for TestNoRaceJetStreamStreamInfoSubjectDetailsLimits.
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-11 21:15:00 -07:00
Derek Collison
349158a349
Fix for datarace accessing mirror tr
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-11 21:12:15 -07:00
Derek Collison
970dfab52f
Need a flush to make sure INFO processed
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-11 20:39:50 -07:00
Derek Collison
e378f04fc0
Add in utility to detect and delete any NRG orphans. ( #4510 )
...
We do not expect this condition at all but did see it in the wild, so
this will detect and cleanup. Will run on same timer (2m) as general
health checks run from `monitorCluster()`
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-11 19:56:21 -07:00
Derek Collison
9531611feb
Add in utility to detect and delete any NRG orphans.
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-11 19:15:12 -07:00
Derek Collison
01aab6d3d4
[FIXED] Fix for datarace on a stream's clfs. ( #4508 )
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-10 11:52:54 -07:00
Derek Collison
7d041da3c8
Fix for datarace on clfs
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-10 11:07:27 -07:00
Derek Collison
5def0a99b4
_EMPTY_ replacements
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-10 10:22:22 -07:00
Waldemar Quevedo
93072c333b
Allow more time in TestNoRaceSeqSetEncodeLarge ( #4505 )
...
In CI this is typically < 700uS, but quite often > 500uS.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-09 10:46:36 -07:00
Waldemar Quevedo
eb06efff15
[FIXED] Skip TestMQTTQoS2InflightMsgsDeliveredAfterUnsubscribe, see c… ( #4506 )
...
`TestMQTTQoS2InflightMsgsDeliveredAfterUnsubscribe` was flaky on
TravisCI.
At this point it was there to illustrate a design issue with MQTT 3.1.1
QoS support, and much of it is disabled since it'd be failing anyway.
Disabling the test until it can be _fully_ applicable/enabled.
2023-09-09 10:46:18 -07:00
Derek Collison
e4867455c2
Fix TestNoRaceJetStreamSparseConsumers ( #4503 )
...
This is the same fix as in
https://github.com/nats-io/nats-server/pull/4500
This means it adds `StallWait` to `PublishAsync`, as that's seems to be
the only
reason why this test fails.
Signed-off-by: Tomasz Pietrek <tomasz@nats.io >
2023-09-08 10:01:24 -07:00
Lev Brouk
64c34c4b5d
[FIXED] Skip TestMQTTQoS2InflightMsgsDeliveredAfterUnsubscribe, see comments
2023-09-08 09:42:51 -07:00
Neil Twigg
e382b52ad8
Allow more time in TestNoRaceSeqSetEncodeLarge
...
In CI this is typically < 700uS, but quite often > 500uS.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-08 16:36:28 +01:00
Neil
71694904cf
Improve TestJetStreamAccountImportJSAdvisoriesAsStream ( #4504 )
...
This updates the test to not fail if the advisories arrive in the
reverse order.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-08 15:36:42 +01:00
Neil Twigg
ede9a6cdfe
Improve TestJetStreamAccountImportJSAdvisoriesAsStream
...
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-08 15:15:18 +01:00
Tomasz Pietrek
7b54a1e6a1
Fix TestNoRaceJetStreamSparseConsumers
...
This is the same fix as in https://github.com/nats-io/nats-server/pull/4500
This means it adds `StallWait` to `PublishAsync`, as that's seems to be the only
reason why this test fails.
Signed-off-by: Tomasz Pietrek <tomasz@nats.io >
2023-09-08 11:34:16 +02:00
Derek Collison
0b35767307
Don't log error in legitimate nkey auth callout config case (4479). ( #4501 )
...
`Resolves #4479 `
In AuthCallout server-config system, a spurious error message would be
generated on server reload in the edge case that the AuthCallout user is
an NKEY and both User and NKEY account members are defined in the
config.
2023-09-07 16:19:52 -07:00
Todd Beets
5519308047
Re-order auth.go imports following server convention.
2023-09-07 15:20:35 -07:00
Todd Beets
006f7a77f9
Don't log error in legitimate nkey auth callout config case (4479).
2023-09-07 11:21:55 -07:00
Tomasz Pietrek
d07e8eb210
Fix TestNoRaceJetStreamInterestStreamCheckInterestRaceBug
...
Signed-off-by: Tomasz Pietrek <tomasz@nats.io >
2023-09-07 19:14:31 +02:00
Neil
6332512649
Use write lock for memory store filtered state ( #4498 )
...
Calls to `filteredStateLocked` can mutate the per-subject state by
recalculating the first sequences. Doing so under a read-only lock can
lead to race conditions, so switch the call sites out to write locks
instead.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-07 16:26:12 +01:00
Neil Twigg
e19e97b0a6
Use write lock for memory store filtered state
...
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-07 12:47:57 +01:00
Derek Collison
11f0ea99a4
Merge branch 'main' into dev
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-09-06 13:33:47 -07:00
Byron Ruth
528ee142cb
Release v2.9.22 ( #4496 )
2023-09-06 16:23:47 -04:00
Byron Ruth
d284298915
Release v2.9.22
...
Signed-off-by: Byron Ruth <byron@nats.io >
2023-09-06 16:08:07 -04:00
Waldemar Quevedo
fd50e79da7
Revert "Enables 0s deduplication window duration when the stream has sources" ( #4495 )
...
This reverts commit db96238ad9 which was
causing `TestNoRaceJetStreamSuperClusterSources` to fail sometimes with
duplicate messages around shutdown.
2023-09-06 12:53:40 -07:00
Waldemar Quevedo
e1574eca3e
Revert "Enables 0s deduplication window duration when the stream has sources ( #4476 )"
...
This reverts commit db96238ad9 .
2023-09-06 11:51:38 -07:00
Byron Ruth
f650e1ad07
Pin Go version in Travis config ( #4494 )
2023-09-06 13:29:15 -04:00
Byron Ruth
d29df72f83
Pin Go version in Travis config
...
Signed-off-by: Byron Ruth <byron@nats.io >
2023-09-06 13:20:10 -04:00
Neil
628a54447c
flake: Fixes TestAccountReqMonitoring ( #4493 )
...
Also fixes some tests using default JS dir instead of TempDir
2023-09-06 13:53:09 +01:00
Neil
1336a78e62
Fix race condition in hashing stream snapshots ( #4492 )
...
The `streamSnapshot` function was not holding the filestore lock while
resetting and using the hasher. This created a data race and also
resulted in flakes in `TestFileStoreSnapshot`.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-06 13:52:49 +01:00
Waldemar Quevedo
579968b60b
flake: Fixes TestAccountReqMonitoring
...
Also fixes some tests using default JS dir instead of TempDir
Signed-off-by: Waldemar Quevedo <wally@nats.io >
2023-09-06 03:43:11 -07:00
Neil Twigg
25564087f9
Fix race condition in hashing stream snapshots
...
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-06 11:32:43 +01:00
Neil
7781407618
v2.10: Use Go 1.21 in nightlies, update rand usage ( #4490 )
...
- Use Go 1.21 in nightlies
- Both rand.Seed and rand.Read are both deprecated, remove its use to
fix staticcheck errors
```go
server/client.go:95:2: SA1019: rand.Seed has been deprecated since Go 1.20 and an alternative
has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value.
Programs that call Seed with a known value to get a specific sequence of results should use
New(NewSource(seed)) to obtain a local random generator. (staticcheck)
server/jetstream_test.go:20399:2: SA1019: rand.Read has been deprecated since Go 1.20
because it shouldn't be used: For almost all use cases, crypto/rand.Read is more appropriate. (staticcheck)
```
2023-09-06 10:22:25 +01:00
Waldemar Quevedo
69bc8d9626
flakes: Fix TestAccountSubjectMapping ( #4491 )
2023-09-05 23:55:37 -07:00
Waldemar Quevedo
0c68b891fe
flakes: Fix TestAccountSubjectMapping
...
When it fails it hangs the build.
Signed-off-by: Waldemar Quevedo <wally@nats.io >
2023-09-05 21:17:22 -07:00
Waldemar Quevedo
d144eaaed8
Replace rand.Rand with crypto/rand.Read in Go +1.20
...
Signed-off-by: Waldemar Quevedo <wally@nats.io >
2023-09-05 16:57:49 -07:00
Waldemar Quevedo
d5d8f29575
Remove rand.Seed use, not needed in Go +1.20
...
Signed-off-by: Waldemar Quevedo <wally@nats.io >
2023-09-05 16:55:04 -07:00
Waldemar Quevedo
eae0e34cf6
[FIXED] MQTT: panic in an error log ( #4489 )
...
### Changes proposed in this pull request:
Fixes a panic in error handling/logging
2023-09-05 15:32:58 -07:00
Lev Brouk
759715a2ba
[FIXED] MQTT: panic in an error log
2023-09-05 14:39:28 -07:00
Neil
45df4c6f2f
De-flake TestJetStreamClusterConsumerMaxDeliveryNumAckPendingBug ( #4488 )
...
This test flakes quite often on the final consumer info check because of
one consumer reporting `PushBound` and the other not. By clearing both,
this should clear up the disagreement.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-09-05 17:46:59 +01:00