Derek Collison
dfb7fac861
Merge branch 'main' into dev
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-28 13:56:35 -07:00
Derek Collison
039f63e260
Bump to 2.9.21-RC.3
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-28 13:41:30 -07:00
Derek Collison
4c14be9fbb
When a lazy simple state has an outdated first that needs to be updated, if fseq had moved past it would panic.
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-28 13:09:37 -07:00
Derek Collison
763f6d169b
Fixup for dmap change in main merge
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-28 10:49:08 -07:00
Derek Collison
f3dccd828a
Merge branch 'main' into dev
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-28 10:42:56 -07:00
Derek Collison
7feebb4f64
Bump to 2.9.21-RC.2
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-28 09:55:45 -07:00
Derek Collison
92430513d3
Add in const for msg record hash size
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-28 04:35:33 -07:00
Derek Collison
21e3d7a512
This is a fix for a bad msg blk detected in the field that had sequence holes.
...
The stream had max msgs per subject of one and only one subject but had lots of messages.
The stream did not recover correctly, and upon further inspection determined that a msg blk had holes, which should not be possible.
We now detect the holes and deal with the situation appropriately.
Heavily tested on the data dump from the field.
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-27 21:43:15 -07:00
Neil
b22cdf18fe
Add support for re-encrypting streams with new key ( #4296 )
...
This adds a new `prev_key` field to the configuration file to allow
transitioning from one encryption key to another.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-07-27 10:10:08 +01:00
Derek Collison
4c41c765f7
Merge branch 'main' into dev
2023-07-26 22:30:17 -07:00
Derek Collison
3a2835c3be
Cherry-pick "Fix not validating single token filtered consumer" ( #4338 )
...
This cherry-picks #3776 into `main` for the next patch release.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-07-26 22:26:58 -07:00
Derek Collison
9a8f846dbb
Merge branch 'main' into dev
2023-07-26 22:22:34 -07:00
R.I.Pienaar
60e67ff9a5
Report correct consumer count in paged list response
...
Previously the Total in paged responses would always equal the
size of the first response this would stall paged clients after
the first page.
Now correctly sets the total so paging continues, improves the
test to verify these aspects of the report
Signed-off-by: R.I.Pienaar <rip@devco.net >
2023-07-27 07:52:24 +03:00
Lev Brouk
a5aaf7811e
PR feedback: improved error message, and cleaned up debugging from the test
2023-07-26 08:47:33 -07:00
Lev Brouk
21888d0c72
Merge branch 'dev' of github.com:nats-io/nats-server into lev-reload-by-message
2023-07-26 08:43:09 -07:00
Tomasz Pietrek
4b72e37f27
Fix not validating single token filtered consumer
...
Signed-off-by: Tomasz Pietrek <tomasz@nats.io >
Signed-off-by: Neil Twigg <neil@nats.io >
2023-07-26 16:21:00 +01:00
Neil Twigg
bc78e86388
Update TestJetStreamServerReencryption to also test converting ciphers at the same time as changing keys
...
Signed-off-by: Neil Twigg <neil@nats.io >
2023-07-26 14:04:28 +01:00
Neil Twigg
3df08c3f89
Add support for re-encrypting streams with new key
...
Signed-off-by: Neil Twigg <neil@nats.io >
2023-07-26 14:04:28 +01:00
Neil
2cb1512543
Add first_seq to StreamConfig ( #4322 )
...
This allows specifying `first_seq` in the stream config when creating a
stream.
Signed-off-by: Neil Twigg <neil@nats.io >
2023-07-26 11:32:33 +01:00
Neil Twigg
65cb4b9559
Fix race condition in TestFileStoreAgeLimitRecovery
...
Signed-off-by: Neil Twigg <neil@nats.io >
2023-07-26 09:59:00 +01:00
Derek Collison
ff33dd2776
Bump to 2.10.0-beta.46
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-25 11:49:17 -07:00
Neil Twigg
4d8d01949b
Add first_seq support to memory store too
...
Signed-off-by: Neil Twigg <neil@nats.io >
2023-07-25 16:08:13 +01:00
Waldemar Quevedo
45beab1f17
Fix typo from internal function ( #4337 )
...
minor internal typo fix
2023-07-25 06:56:23 -07:00
Neil Twigg
9538a1895b
Add first_seq to StreamConfig for file store
...
Signed-off-by: Neil Twigg <neil@nats.io >
2023-07-25 11:27:07 +01:00
Lev Brouk
94788b4906
PR feedback: test nits
2023-07-24 07:01:01 -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
Derek Collison
1e15061400
Cleanup for some staticcheck warnings
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-21 19:17:54 -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
9d9d760af2
Merge branch 'main' into dev
2023-07-21 11:42:02 -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
c6c5358513
Merge branch 'main' into dev
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-20 13:21: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
Lev Brouk
46a38929d9
Fixed tests
2023-07-19 12:06:49 -07:00
Lev Brouk
4a19059002
PR feedback: use subject const in the test
2023-07-19 12:04:19 -07:00
Lev Brouk
2d42b81e7b
PR feedback: use more idiomatic require_Error with text
2023-07-19 12:04:19 -07:00
Lev Brouk
0040708c92
PR feedback: (fixed) and added test for Reload failing
2023-07-19 12:04:19 -07:00
Lev Brouk
1ce772c1a0
Added: reload server config by sending it a message
...
gofmt
PR feedback: test that a regular account can not reload
PR feedback: set response.Data to nil on success
2023-07-19 12:04:19 -07:00
Derek Collison
e1a00a883c
Fix bug that would race around check for last sequence per subject
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-18 12:39:06 -07:00
Derek Collison
efbfe217f4
Moved to end for merge with other branches, minor changes
...
Signed-off-by: Derek Collison <derek@nats.io >
2023-07-18 12:39:06 -07:00
Byron Ruth
16a336ead3
Add test case for concurrent expected last subject sequence
...
Signed-off-by: Byron Ruth <byron@nats.io >
2023-07-18 12:39:06 -07:00
Derek Collison
3173d435b1
Initial support for zOS ( #4209 )
...
zOS is an IBM Z (mainframe) operating system. In the days of yore, it
was MVS.
- [ ] Link to issue, e.g. `Resolves #NNN`
- [ ] Documentation added (if applicable)
- [ ] 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 )
Resolves - the inability to build on zOS.
### Changes proposed in this pull request:
- This PR adds a couple of files to allow building nats-server on zOS.
2023-07-18 12:21:31 -07: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