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

[Ehancement] Redis version check before start up? #20

Open
zerg000000 opened this issue Nov 11, 2023 · 4 comments
Open

[Ehancement] Redis version check before start up? #20

zerg000000 opened this issue Nov 11, 2023 · 4 comments

Comments

@zerg000000
Copy link

I am very interested in adding a Redis version check before starting.

Because it is very hard to debug and carmine-streams don't have any doc showing the minimum version of the required Redis.

If it is too much, a separate function to check if the Redis version is supported would also be very helpful.

@oliyh
Copy link
Owner

oliyh commented Nov 11, 2023

Hello,

Could definitely add a function to call which would tell you if it's compatible or not

@oliyh
Copy link
Owner

oliyh commented Nov 11, 2023

For clarity, you need Redis v7 for the full set of features in v2.x. v1.x should work with Redis 6

@zerg000000
Copy link
Author

is this fn enough to do the checking?

(defn compatible? 
  [conn-opts] 
  (let [[_ version] (->> (car/wcar conn-opts (car/info :server))
                         (re-find #"redis_version:([0-9])"))] 
    (>= (parse-long version) 7))) 

@oliyh
Copy link
Owner

oliyh commented Nov 18, 2023

Looks good, do you want to make a PR?

Cheers

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

No branches or pull requests

2 participants