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

Allow EVAL_RO and EVALSHA_RO to be routed to read replica #2494

Merged
merged 5 commits into from
Dec 25, 2022

Conversation

zakaf
Copy link
Contributor

@zakaf zakaf commented Dec 8, 2022

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

  • fixes EVAL_RO, EVALSHA_RO doesn't get routed to replicas #2490 by adding EVAL_RO and EVALSHA_RO to READ_COMMANDS
  • minor typo fix (Lue -> Lua)
  • test_reading_from_replicas_in_round_robin asserts multiple GET commands getting routed to master and replica
    • two READONLY calls would only happen with 3 or more GET commands only if there are two nodes for the slot

In addition, i've tested locally using the below method

  1. running MONITOR command on both the master and the replica node
  2. RUN EVAL_RO and EVALSHA_RO multiple times
  3. see the output of MONITOR to confirm that commands were routed in a round-robin manner

@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2022

Codecov Report

Base: 92.22% // Head: 92.22% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (a184119) compared to base (55298e4).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2494      +/-   ##
==========================================
- Coverage   92.22%   92.22%   -0.01%     
==========================================
  Files         113      113              
  Lines       29380    29378       -2     
==========================================
- Hits        27096    27094       -2     
  Misses       2284     2284              
Impacted Files Coverage Δ
redis/commands/cluster.py 94.02% <ø> (ø)
redis/commands/core.py 82.16% <ø> (ø)
tests/test_scripting.py 93.58% <ø> (-0.09%) ⬇️
tests/test_cluster.py 97.01% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zakaf
Copy link
Contributor Author

zakaf commented Dec 8, 2022

@chayim i've created a PR to address #2494. If you have any concern with the PR, please let me know

@chayim chayim requested a review from dvora-h December 13, 2022 10:26
@chayim chayim added the feature New feature label Dec 13, 2022
@dvora-h dvora-h merged commit d693221 into redis:master Dec 25, 2022
@zakaf zakaf deleted the eval_sha_ro_on_cluster_replica branch January 10, 2023 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EVAL_RO, EVALSHA_RO doesn't get routed to replicas
5 participants