Tomasz Pietrek
d400664b67
Fix source header name retrieval
...
Stream subject mapping added index prefix to Nats-Stream-Source which
was stripped when retrieving that header. That caused
startingSequenceForSources to iterate over whole stream because of
name mismatch.
Stripping was removed in this commit.
Signed-off-by: Tomasz Pietrek <tomasz@nats.io >
2023-02-27 13:18:23 +01:00
Derek Collison
c70290acbb
Merge pull request #3912 from nats-io/jnm/dev_26Feb23
...
Port https://github.com/nats-io/nats-server/pull/3887 to dev
2023-02-26 20:39:13 -08:00
Jean-Noël Moyne
cf53a47b01
Applies https://github.com/nats-io/nats-server/pull/3887/files to dev (since the merge of main to dev of that PR effectively made it disappear (because stream transform changes included extracting transforms from accounts.go)
2023-02-26 17:15:54 -08:00
Derek Collison
395409e2cd
Fixed up consumer stream pending logic from merge with main.
...
Bumped version
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-25 19:50:03 -08:00
Derek Collison
2463d83ad5
Merge branch 'main' into dev
2023-02-25 19:48:47 -08:00
Derek Collison
67ba9868f1
Merge pull request #3911 from nats-io/raft-spin
...
[FIXED] If a truncate for a raft WAL failed we could spin.
2023-02-25 19:40:44 -08:00
Derek Collison
4fa0ea32c3
[FIXED] If a truncate for a raft WAL failed we could spin.
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-25 19:07:27 -08:00
Derek Collison
65127d636e
Merge pull request #3910 from nats-io/store-speedups
...
[FIXED] JetStream Store fixes and speedups.
2023-02-25 17:51:21 -08:00
Derek Collison
daacbf5580
Added optimized store NumPending() call.
...
Optimized and fixed a bug in filestore filteredPending().
Optimized memstore FilteredState().
Added comprehensive tests for NumPending() and FilteredState().
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-25 17:26:26 -08:00
Derek Collison
24c2f3b452
Improved performance of subjects details for stream info.
...
This version avoids all disk IO in the filestore version.
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-24 17:22:18 -08:00
Derek Collison
538c6d0797
Merge branch 'main' into dev
2023-02-23 22:47:04 -08:00
Derek Collison
87a1846822
Merge pull request #3907 from nats-io/raft-fix
...
[FIXED] Snapshots would not compact through applied.
2023-02-23 22:44:45 -08:00
Derek Collison
ea2bfad8ea
Fixed bug where snapshot would not compact through applied. This mean a subsequent request for exactly applied would return that entry only not the full state snapshot.
...
Fixed bug where we would not snapshot when we should.
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-23 22:19:37 -08:00
Derek Collison
8169a117e4
Merge pull request #3861 from nats-io/jarema/fix-scaleup-with-maxage
...
Fix new replicas late MaxAge expiry
2023-02-23 16:41:26 -08:00
Tomasz Pietrek
02ba78454d
Fix new replicas late MaxAge expiry
...
This commit fixes the issue when scaling Stream with MaxAge
and some older messages stored. Until now, old messages were not properly
expired on new replicas, because new replicas first expiry timer
was set to MaxAge duration.
This commit adds a check if received messages expiry happens before
MaxAge, meaning they're messages older than the replica.
https://github.com/nats-io/nats-server/issues/3848
Signed-off-by: Tomasz Pietrek <tomasz@nats.io >
2023-02-24 00:46:02 +01:00
Derek Collison
79df099c44
Merge pull request #3905 from nats-io/raft-stepdown-logic
...
[IMPROVED] Make sure preferred peer for stepdown is healthy.
2023-02-23 13:58:58 -08:00
Derek Collison
45859e6476
Make sure preferred peer for stepdown is healthy.
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-23 13:06:13 -08:00
Derek Collison
9d972642e9
Merge pull request #3904 from nats-io/meta-improvements
...
[IMPROVED] When becoming meta-leader optionally send current snapshot to followers.
2023-02-23 10:54:14 -08:00
Derek Collison
d347cb116a
When becoming leader optionally send current snapshot to followers if caught up.
...
This can help sync on restarts and improve ghost ephemerals. Also added more code to suppress respnses and API audits when we know we are recovering.
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-23 10:30:36 -08:00
Derek Collison
8d73757129
Merge pull request #3903 from nats-io/neil/codeowners
...
Set code owners, tweak PR template
2023-02-23 10:24:52 -08:00
Neil Twigg
8729ff4015
Set code owners, tweak PR template
2023-02-23 10:48:20 +00:00
Derek Collison
b6a5ae3bb4
Merge branch 'main' into dev
2023-02-22 19:54:55 -08:00
Derek Collison
f2c5e7ec02
Bump to 2.9.15-RC.2
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-22 19:54:13 -08:00
Derek Collison
7aa407a757
Merge pull request #3901 from nats-io/consumer-create-perf
...
[IMPROVED] Consumer create performance in some circumstances.
2023-02-22 19:53:13 -08:00
Derek Collison
2972c11be6
Improve consumer create performance.
...
In cases where we had a large subject space, a filestore with many msg blocks, and a filtered consumer with a wildcard filtered subject, creating a consumer could take more memory and time then we wanted.
This improvement works when the consumer is DeliverAll and we used the upper layer in memory psim structure to scan but only in memory and avoid a file read for each msg block.
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-22 19:42:02 -08:00
Derek Collison
f16a7d8559
Skip test for now
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-22 15:49:48 -08:00
Derek Collison
306fb89163
Merge branch 'main' into dev
2023-02-22 13:42:52 -08:00
Derek Collison
adebb650d4
Merge pull request #3900 from nats-io/kv-accounting
...
[FIXED] KV accounting errors under heavy concurrent usage
2023-02-22 14:42:19 -07:00
Derek Collison
4fd2e680e7
Merge branch 'main' into dev
2023-02-22 13:01:31 -08:00
Derek Collison
d03d8e9d93
When having a max msgs per subject (e.g. KV) under heavy concurrent usage could skew the accounting for the underlying filestore.
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-22 12:50:43 -08:00
Derek Collison
591f2b754d
Merge pull request #3898 from nats-io/neil/consumercompact
...
Install snapshot and compact when WAL grows, even when no state changes occur
2023-02-22 13:18:01 -07:00
Neil Twigg
cfea34c80c
Install snapshot and compact when WAL grows, even when no state changes occur
2023-02-22 20:00:57 +00:00
Derek Collison
b19077c2e9
Bump to 2.9.15-RC.1
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-21 08:35:30 -08:00
Derek Collison
7ce23c46ce
Merge branch 'main' into dev
2023-02-21 08:34:08 -08:00
Derek Collison
baf2e47c06
Merge pull request #3894 from nats-io/neil/ipqueue
...
Refactor `ipQueue` to use generics
2023-02-21 09:31:26 -07:00
Neil Twigg
68961ffedd
Refactor ipQueue to use generics, reduce allocations
2023-02-21 14:50:09 +00:00
Derek Collison
ebb2ba638f
Bump to 2.10.0-beta.21
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-20 18:55:32 -08:00
Derek Collison
b40621b508
Fixups for large merge with main
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-20 18:41:03 -08:00
Derek Collison
cac712b1d1
Merge branch 'main' into dev
2023-02-20 18:30:26 -08:00
Derek Collison
18b5aca499
Merge pull request #3892 from nats-io/consumer-fixes
...
[FIXED] Consumer fixes and improvements on state management.
2023-02-20 19:17:39 -07:00
Derek Collison
3c64d07691
Warn of consumer state update failures.
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-20 17:28:11 -08:00
Derek Collison
53cf6635e2
Merge pull request #3893 from nats-io/raft-fixes
...
[FIXED] Spurious "Error storing entry to WAL" log messages
2023-02-20 18:23:40 -07:00
Derek Collison
2a9f085d55
Merge branch 'main' into raft-fixes
2023-02-20 15:43:46 -07:00
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
Neil
7e67ec5b1f
Merge pull request #3891 from nats-io/neil/pindex
...
Off-by-one on RAFT pindex
2023-02-20 22:35:57 +00:00
Derek Collison
ad8aa7c0c5
Merge pull request #3887 from MauriceVanVeen/main
...
[FIXED] Using partition with multiple wildcard token positions
2023-02-20 13:59:49 -07:00
Derek Collison
d2179e0939
Make sure to also cleanup pending if below our stream ack floor
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-20 11:56:37 -08:00
Derek Collison
b6149c51f0
Make sure to clean up redelivered state on purge.
...
Make sure to update ack floors on messages being expired out from underneath of us.
Signed-off-by: Derek Collison <derek@nats.io >
2023-02-20 11:16:12 -08:00
Neil Twigg
20980dc324
Off-by-one on RAFT pindex
2023-02-20 18:16:10 +00: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