-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
(2.11) ADR-44: JetStream Asset Versioning in Metadata #5850
Conversation
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
…kage Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
Behaviour wise this is pretty spot on |
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
5ca862a
to
ca9ec95
Compare
Signed-off-by: Maurice van Veen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need binary artifacts (the snapshots) store in GH? Can we just create them on the fly for the test?
Prefer not to have binary assets checked into GH if we can help it.
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…5855) Implements [ADR-44](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-44.md) Extends #5850 Expose the supported JetStream API level in varz, jsz, statsz and `$JS.API.INFO`. Both over the HTTP endpoints as well as requests to `$SYS.REQ.SERVER.PING.VARZ` and the like. Signed-off-by: Maurice van Veen <[email protected]> --------- Signed-off-by: Maurice van Veen <[email protected]>
Implements [ADR-44](https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-44.md) Extends #5850 Add dynamic JetStream stream/consumer metadata: ``` _nats.server.version _nats.server.api_level ``` These are not persisted and are only returned in the response of a create/update/info request. Signed-off-by: Maurice van Veen <[email protected]> --------- Signed-off-by: Maurice van Veen <[email protected]>
Implements ADR-44
Initial addition of JetStream Asset Versioning, containing:
_nats.created.server.version
_nats.created.server.api_level
_nats.server.require.api_level
[INF] API Level: 1
Note that stream and consumer metadata is only set/updated upon:
(created metadata will not be set for pre-existing assets, only required level will be updated)
Many tests are added ensuring that:
(if it doesn't exist, for example restoring a backup from a previous version)
(if it doesn't exist, for example due to upgrading)
PauseUntil
ups or lowers required API level_nats.>
metadata fields, they will be overwritten to the appropriate values(for example an update by a client that doesn't know about metadata yet)
These tests check for both non-clustered R1 setups and clustered R3 setups.
This PR doesn't fully implement ADR-44. There will be follow-up PRs later on to add support for:
_nats.server.version
and_nats.server.api_level
that report the current server version and API level the asset lives on:(2.11) ADR-44: JetStream Dynamic Metadata #5857
jsz
,varz
and$JS.API.INFO
(it is already reported in the logs during startup):(2.11) ADR-44: JetStream API Level in varz,jsz,statsz,$JS.API.INFO #5855
There are some slight inconsistencies between the ADR and this PR. For example using the terms feature level,
api_version
andapi_level
that all mean the same and are all made consistent to beapi_level
. I'll correct the ADR with any changed details after this PR has been merged.Signed-off-by: Maurice van Veen [email protected]