Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-picks for 2.10.21-RC.2 #5911

Merged
merged 6 commits into from
Sep 20, 2024
Merged

Cherry-picks for 2.10.21-RC.2 #5911

merged 6 commits into from
Sep 20, 2024

Conversation

MauriceVanVeen and others added 2 commits September 20, 2024 19:16
Extension to #5893

If we can't update the index.db upon shutdown, for example during a hard
kill, we'd enter into this condition if `MaxMsgsPer` was set.

https://github.com/nats-io/nats-server/pull/5893/files#diff-384c189826934c9a6fc3554dafc63dab2076245010e3d6fce5c71a93e15e9877R1752

However, all limits-based fields have this issue not just `MaxMsgsPer`.
Running similar tests where `nats str info` before hard kill should
equal its output after hard kill:
- `MaxMsgsPer`: −7,877 diff (fixed with addition of above condition/PR)
- `MaxMsgs`: +2,123 diff
- `MaxAge`: no diff (correct messages, but still `[WRN] Filestore
[stream] loadBlock error: message block data missing`)
- `MaxBytes`: +3,567 diff (had a MaxBytes set of 1016 MiB, but after
restart the state has more messages and Bytes: 1020 MiB)

I think we shouldn't only target `MaxMsgsPer`, since other fields can
also trigger this and making it specific to also include these other
fields would come back to bite if we add other limits-based fields in
the future and forget to add it in this condition.
We need to detect index.db was not written during shutdown or there is a
difference between index.db and our msg blocks. If we detect this we
can't rely on it being correct still, so I'd propose to simplify and
upon detecting defer to rebuilding.

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>

---------

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
For example, to set minimum version to TLS v1.3:

  tls { min_version = "1.3" }

Signed-off-by: Waldemar Quevedo <wally@nats.io>
neilalexander and others added 4 commits September 20, 2024 19:23
Signed-off-by: Neil Twigg <neil@nats.io>
This allows client certificates on the https monitoring port to be
validated when OCSP peering is enabled.

Signed-off-by: Jarret Lavallee <jarret@synadia.com>

---------

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Jarret Lavallee <jarret@synadia.com>
Co-authored-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
…ditional blocks (#5907)

When determining to rebuild state, when we match the last record in the
last block indicated by index.db, we still need to check for additional
blocks.

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

---------

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

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neilalexander neilalexander merged commit fd3a2e6 into release/v2.10.21 Sep 20, 2024
5 checks passed
@neilalexander neilalexander deleted the neil/21021rc2 branch September 20, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants