Skip to content

Fix broken protocol in MISCONF error, RM_Yield bugs, RM_Call(EVAL) OOM check bug, and new RM_Call checks.#10786

Merged
oranagra merged 6 commits intoredis:unstablefrom
oranagra:RM_Call_eval_mode
Jun 1, 2022
Merged

Fix broken protocol in MISCONF error, RM_Yield bugs, RM_Call(EVAL) OOM check bug, and new RM_Call checks.#10786
oranagra merged 6 commits intoredis:unstablefrom
oranagra:RM_Call_eval_mode

Conversation

@oranagra
Copy link
Member

@oranagra oranagra commented May 27, 2022

  • Fix broken protocol when redis can't persist to RDB (general commands, not
    modules), excessive newline. regression of Add new RM_Call flags for script mode, no writes, and error replies. #10372 (7.0 RC3)
  • Fix broken protocol when Redis can't persist to AOF (modules and
    scripts), missing newline.
  • Fix bug in OOM check of EVAL scripts called from RM_Call.
    set the cached OOM state for scripts before executing module commands too,
    so that it can serve scripts that are executed by modules.
    i.e. in the past EVAL executed by RM_Call could have either falsely
    fail or falsely succeeded because of a wrong cached OOM state flag.
  • Fix bugs with RM_Yield:
    1. SHUTDOWN should only accept the NOSAVE mode
    2. Avoid eviction during yield command processing.
    3. Avoid processing master client commands while yielding from another client
  • Add new two more checks to RM_Call script mode.
    1. READONLY You can't write against a read only replica
    2. MASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to no
  • Add new RM_Call flag to let redis automatically refuse deny-oom commands
    while over the memory limit.
  • Add tests to cover various errors from Scripts, Modules, Modules
    calling scripts, and Modules calling commands in script mode.

Add tests:

  • Looks like the MISCONF error was completely uncovered by the tests,
    add tests for it, including from scripts, and modules
  • Add tests for NOREPLICAS from scripts
  • Add tests for the various errors in module RM_Call, including RM_Call that
    calls EVAL, and RM_call in "eval mode". that includes:
    NOREPLICAS, READONLY, MASTERDOWN, MISCONF

* Fix broken protocol when redis can't persist to RDB (general commands, not
  modules)
* Fox broken protocol when Redis can't persist to AOF (modules and
  scripts)
* Add new two more checks to RM_Call script mode.
  1. READONLY You can't write against a read only replica
  2. MASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'
* Add tests to cover varoius errors from Scripts, Modules, Modules
  calling scripts, and Modules caling commands in script mode.

Add tests:
* Looks like the MISCONF error was completely uncovered by the tests,
  add tests for it, including from scripts, and modules
* Add tests for NOREPLICAS from scripts
* Add tests for the various errors in module RM_Call, including RM_Call that
  calls EVAL, and RM_call in "eval mode". that includes:
  NOREPLICAS, READONLY, MASTERDOWN, MISCONF
oranagra added 2 commits May 27, 2022 19:04
* Fix bug in OOM check of EVAL scripts called from RM_Call.
  set the cached OOM state for scripts before executing module commands too,
  so that it can serve scripts that are executed by modules.
  i.e. in the past EVAL executed by RM_Call could have either falsely
  fail or falsely succeeded because of a wrong cached OOM state flag.
* Fix bugs with RM_Yield:
  1. SHUTDOWN should only accept the NOSAVE mode
  2. Avoid eviction during yield command processing.
  3. Avoid processing master client commands while yielding from another client
* Add new RM_Call flag to let redis automatically refuse `deny-oom` commands
  while over the memory limit.
Copy link

@MeirShpilraien MeirShpilraien left a comment

Choose a reason for hiding this comment

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

👍 Small comments (not a blocker)

@oranagra oranagra changed the title Fix broken protocol in MISCONF error, regression of #10372 (7.0 RC3) Fix broken protocol in MISCONF error, RM_Yield bugs, RM_Call(EVAL) OOM check bug, and new RM_Call checks. May 29, 2022
@redis redis deleted a comment from 627721565 May 31, 2022
@oranagra oranagra merged commit b2061de into redis:unstable Jun 1, 2022
@oranagra oranagra added state:major-decision Requires core team consensus release-notes indication that this issue needs to be mentioned in the release notes labels Jun 1, 2022
@oranagra oranagra deleted the RM_Call_eval_mode branch June 1, 2022 10:04
@oranagra oranagra mentioned this pull request Jun 8, 2022
enjoy-binbin pushed a commit to enjoy-binbin/redis that referenced this pull request Jul 31, 2023
…M check bug, and new RM_Call checks. (redis#10786)

* Fix broken protocol when redis can't persist to RDB (general commands, not
  modules), excessive newline. regression of redis#10372 (7.0 RC3)
* Fix broken protocol when Redis can't persist to AOF (modules and
  scripts), missing newline.
* Fix bug in OOM check of EVAL scripts called from RM_Call.
  set the cached OOM state for scripts before executing module commands too,
  so that it can serve scripts that are executed by modules.
  i.e. in the past EVAL executed by RM_Call could have either falsely
  fail or falsely succeeded because of a wrong cached OOM state flag.
* Fix bugs with RM_Yield:
  1. SHUTDOWN should only accept the NOSAVE mode
  2. Avoid eviction during yield command processing.
  3. Avoid processing master client commands while yielding from another client
* Add new two more checks to RM_Call script mode.
  1. READONLY You can't write against a read only replica
  2. MASTERDOWN Link with MASTER is down and `replica-serve-stale-data` is set to `no`
* Add new RM_Call flag to let redis automatically refuse `deny-oom` commands
  while over the memory limit. 
* Add tests to cover various errors from Scripts, Modules, Modules
  calling scripts, and Modules calling commands in script mode.

Add tests:
* Looks like the MISCONF error was completely uncovered by the tests,
  add tests for it, including from scripts, and modules
* Add tests for NOREPLICAS from scripts
* Add tests for the various errors in module RM_Call, including RM_Call that
  calls EVAL, and RM_call in "eval mode". that includes:
  NOREPLICAS, READONLY, MASTERDOWN, MISCONF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes state:major-decision Requires core team consensus

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants