Commit Graph

4494 Commits

Author SHA1 Message Date
Derek Collison
e028b7230a Need to compact wal on snapshot to pindex+1
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-20 14:37:37 -08:00
Maurice van Veen
05695d304c Fixed a bug where partition was used with multiple wildcard token position 2023-02-20 10:27:29 +01:00
Derek Collison
5c6b3b620a Merge pull request #3885 from nats-io/jarema/improve-interest-test
Improve test for consumer with inactivity threshold
2023-02-19 10:36:36 -07:00
Tomasz Pietrek
337a9f2cbd Improve test for consumer with inactivity threshold
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
2023-02-19 17:57:09 +01:00
Waldemar Quevedo
beb179ec15 Check if connection name was already set when storing it
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-02-19 07:58:56 -08:00
Derek Collison
06fd81d096 Fixed a bug where a named consumer under interest policy was spinning up inactive threshold timers in all replicas not just the leader.
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-19 06:08:43 -08:00
Derek Collison
e270e9538f Do not warn if consumer replicas condigured to 0
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-18 11:50:26 -08:00
Derek Collison
6a62ac4560 Fix for merge conflict
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-18 11:12:15 -08:00
Derek Collison
6a4c61e1a3 Merge branch 'main' into bad-consumer-delete 2023-02-18 11:09:56 -08:00
Derek Collison
01fa89a0b4 Fix for deleting consumers on restarts and non-fatal update errors.
If there was a spurious error on restart, or possibly on an update, we could delete a consumer which was the incorrect behavior.

Signed-off-by: Derek Collison <derek@nats.io>
2023-02-18 09:46:52 -08:00
Derek Collison
efa3bcc49d Parallel consumer creation could drop responses (create and info) and could also run monitorConsumer twice.
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-18 05:16:05 -08:00
Derek Collison
2d794d09e1 Fix to flapping test to make sure we do not quickly blow away all consumer state.
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-17 14:23:34 -08:00
Derek Collison
11b0f214d0 Do not re-calculate NumPending on consumer info calls.
We noticed this was being called alot in user environments.
When the consumer was filtered with a wilcard and the stream had a high cardinality of subjects and was falling behind this could take a substantial amount of time.

Signed-off-by: Derek Collison <derek@nats.io>
2023-02-16 16:30:14 -08:00
Derek Collison
0cb01f9e7a Make sure we update storage accounting on extended version purge for filestore.
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-16 13:18:40 +04:00
Derek Collison
b3b9e888f3 Merge pull request #3873 from nats-io/diskio-test
[FIXED] Adjusted test to correspond to new limit of 1024.
2023-02-15 20:45:15 -07:00
Derek Collison
32b5ec16dd Fixed test to correspond to new limit of 1024.
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-16 07:16:19 +04:00
Waldemar Quevedo
4452f64d73 Fix TestJetStreamParallelConsumerCreation race
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-02-15 17:23:48 -08:00
Derek Collison
345496f331 Merge pull request #3867 from nats-io/improvements
Improvements to Filestore
2023-02-14 05:35:40 -07:00
Derek Collison
3bc0af70d0 Only update per subject information if we know we have an update.
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-13 20:12:35 +02:00
Derek Collison
e2f9fb73a9 Increase limit for internal blocking IO vs num cores.
Will help in slow IO situations and lots of expire cache calls.

Signed-off-by: Derek Collison <derek@nats.io>
2023-02-13 18:44:25 +02:00
Derek Collison
1e3c2810f4 Improve expireMsgs minAge calculation for when lots of messages to expire in each callback.
This happens when under extreme load as shown in the skipped test.

Signed-off-by: Derek Collison <derek@nats.io>
2023-02-13 18:39:39 +02:00
Neil Twigg
ba0b1f8bd3 Fix stack overflow panic in reverse entry check when inbox ends with wildcard 2023-02-13 09:45:50 +00:00
Derek Collison
0da2a150cc Make sure we adjust per subject info when doing a Compact().
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-10 07:21:02 +02:00
Neil Twigg
9e8a5bfa3b File store subtests 2023-02-08 09:55:49 +00:00
Byron Ruth
dd96f9b572 Bump v2.9.15-beta
Signed-off-by: Byron Ruth <byron@nats.io>
2023-02-06 14:43:42 -05:00
Byron Ruth
8db9ca6d7b Release v2.9.14
Signed-off-by: Byron Ruth <byron@nats.io>
2023-02-06 14:17:25 -05:00
Derek Collison
6a2063f5b3 Revert logic
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-06 22:14:37 +04:00
Derek Collison
b611e37e95 For updating a consumer filter subject make sure locking ordere correct and that our sublist is present.
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-06 21:34:48 +04:00
Derek Collison
0ffce191cd Bump to 2.9.14-beta
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-04 22:26:19 -08:00
Derek Collison
b22ed47a26 Use fast state in case many interior deletes and small fix for staticcheck
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-04 13:55:41 -08:00
Derek Collison
9c02be2409 Various fixes for snapshots.
Due to bug, in rare circumstances could write an empty snapshot for aplied == 0. This would cause a spinning at the raft layer.

1. Allow Truncate() to also properly do a reset of the store when terms were only mismatch.
2. During testing fixed memstore truncate and also made sure per subject info was also cleaned up.
3. Then added fix to detect a bad snapshot on initialization and remove.
4. Do not allow snapshots for applied == 0.

Signed-off-by: Derek Collison <derek@nats.io>
2023-02-04 13:46:06 -08:00
Byron Ruth
a56dcc60c2 Bump 2.9.13-beta
Signed-off-by: Byron Ruth <byron@nats.io>
2023-02-02 14:01:49 -05:00
Byron Ruth
035edeaecb Release v2.9.12
Signed-off-by: Byron Ruth <byron@nats.io>
2023-02-02 13:26:59 -05:00
Tomasz Pietrek
46af979871 Fix current consumers not getting messages after purge
Until now, purge updated all consumers sequences
even if purge subject was only a subset of given consumer filter.
Because of that, even messages from not purged subjects were not fetched
or properly accounted for existing consumers.

Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
2023-02-02 16:27:32 +01:00
Derek Collison
4744ff3478 Bump to 2.9.12-RC.3
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-01 22:46:25 -07:00
Derek Collison
e9a983c802 Do not let !NeedSnapshot() avoid snapshots and compaction.
Signed-off-by: Derek Collison <derek@nats.io>
2023-02-01 22:05:25 -07:00
Derek Collison
390fd02918 Updates to tests for updated Go client changes
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-31 09:47:36 -08:00
Derek Collison
1252653c16 Merge pull request #3829 from nats-io/jarema/fix-message-after-update
Fix Consumer not getting messages after filter update
2023-01-30 19:59:32 -08:00
Derek Collison
d9aa69c332 Bump to 2.9.12-RC.2
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-30 19:56:53 -08:00
Derek Collison
e0798d26eb Merge pull request #3831 from nats-io/snapshots
Minor fixes and optimizations for snapshots.
2023-01-30 19:53:22 -08:00
Derek Collison
598e27243f Fix possible deadlock on dataloss
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-30 19:10:19 -08:00
Derek Collison
6058056e3b Minor fixes and optimizations for snapshots.
We were snappshotting more then needed, so double check that we should be doing this at the stream and consumer level.
At the raft level, we should have always been compacting the WAL to last+1, so made that consistent. Also fixed bug that would not skip last if more items behind the snapshot.

Signed-off-by: Derek Collison <derek@nats.io>
2023-01-30 17:54:18 -08:00
Waldemar Quevedo
13372508e2 Fix for isGroupLeaderless when JS not available (due to shutdown)
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-01-30 15:29:42 -08:00
Tomasz Pietrek
836848ca64 Fix Consumer not getting messages after filter update
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
2023-01-30 20:47:17 +01:00
Derek Collison
52a78c0352 Small optimizations.
1. Only snapshot with minSnap time window like consumers and meta. Make it consistent for all to 5s.
2. Only snapshot at the end of processing all entries pending vs inside the loop.
3. Use fast state when calculating sync request, do not need deleted details there.

Signed-off-by: Derek Collison <derek@nats.io>
2023-01-29 10:58:00 -08:00
Derek Collison
e1a2da8d85 Small optimizations
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-28 11:45:47 -08:00
Derek Collison
bf49f23bb1 Only hold on to so many pending in memory, will fetch from WAL
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-28 11:34:55 -08:00
Derek Collison
64096e5ef5 Fix for flapping test
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-27 13:19:44 -08:00
Derek Collison
f4e6481ce7 Allow report cycles between source streams if subjects truly form a cycle.
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-27 13:03:24 -08:00
Derek Collison
7682eaa389 Merge pull request #3804 from madper/dragonflybsd
Add support for dragonfly bsd.
2023-01-27 08:35:42 -08:00