-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add new master_name param for sentinel. Fixes #531 #640
Conversation
Hi team, |
I just discovered the same issue and was about to file a similar pull request. Thanks for coming up with a solution already. :) I'd be very happy to see this merged. |
Until this is merged, due to the nature of the issue, does this mean that sentinels must be installed on the same host as the redis master? |
In the configuration for each sentinel you define the address and port of the master and assign it a name. Right now the redis gem assumes this name is the same as the host name. |
Hi, this param is critical to make the gem work with sentinel, because the hostnames/ip addresses (should) have no relation to the master-name (http://redis.io/topics/sentinel). So +1(!). Thanks. |
@Dahie The master name is assumed to be the same as the hostname of the redis master or the hostname of the sentinel? As far as I can tell, you connect to one or more sentinels using the |
@ac-astuartkregor The gem currently assumes the master name is the same as the host the master redis is running on. |
@Dahie Huh, I tried that and it barfed, so perhaps I messed up something else as well. |
We're using redis with the following conf.
remember the configure_client part also |
Ping. Is this repo still maintained? |
I thought merging in master would help but turns out master currently fails the build also. |
Yey for flaky tests. That's a known issue with current Redis and unrelated to this PR. |
Ping... any news here? |
Looks like master still fails with Redis Unstable, meaning no PRs are being merged in this project until sorted? |
Ping @badboy Is there anything left for me to do to get this into a mergeable state? |
Nah, I just didn't spend any time on this project in the last months. I try to catch up. |
@BookOfGreg could you add a line for this new option to the client documentation? |
bors r+ |
640: Add new master_name param for sentinel. Fixes #531 r=badboy Associated with issue #531. Based on #534 with the addition of tests. Didn't know how to keep @nguyenductung 's commit sadly but this PR does fix the issue and is tested. 701: Get tests passing with frozen-string-literals enabled. r=badboy This one simple change ensure that all string literals can be frozen (as per the optional feature in MRI 2.3 and onwards). @twalpole has (again) beaten me to such a patch (in #590), though mine (again) does not add the pragma comment to all files. Getting their or my PRs merged in would be excellent :) As an alternative to the pragma comment, I would recommend adding the following to your .travis.yml file to ensure regressions aren't introduced: ```yml before_script: - if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT ``` This will add the flag when the tests are run on MRI 2.4 or newer (while the feature was introduced in 2.3, it doesn't seem to work reliably until 2.4). Please note: tests will currently fail when this flag is set unless test-unit is also updated (as noted in test-unit/test-unit#149).
@BookOfGreg hey, why was this PR closed and never merged, is there another way to pass the EDIT: |
Associated with issue #531.
Based on #534 with the addition of tests.
Didn't know how to keep @nguyenductung 's commit sadly but this PR does fix the issue and is tested.