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

Apply stream compression from file store config #4072

Merged
merged 1 commit into from Apr 19, 2023
Merged

Conversation

neilalexander
Copy link
Member

@neilalexander neilalexander commented Apr 18, 2023

This PR fills the missing link between the stream config and the actual compression state.

Related: nats-io/jsm.go#445, nats-io/natscli#762

Signed-off-by: Neil Twigg neil@nats.io

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander marked this pull request as ready for review April 18, 2023 17:36
@neilalexander neilalexander requested a review from a team as a code owner April 18, 2023 17:36
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

var str string
switch alg {
case S2Compression:
str = "s2"
Copy link
Member

Choose a reason for hiding this comment

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

I suggest S2, I think that is how they refer to it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I stuck with the existing pattern from the JS schema here, which is that the values are all lower-case, although there is a separate String() function in the jsm.go PR that is for pretty-printing in the CLI ("S2 compression") so a CLI user never sees it.

@neilalexander neilalexander merged commit 4000f8b into dev Apr 19, 2023
2 checks passed
@neilalexander neilalexander deleted the neil/compresscfg branch April 19, 2023 09:40
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.

None yet

2 participants