8000 Read-only scripts and SCRIPT LOAD move the replication offset (a SELECT is propagated for them) · Issue #705 · kividbio/kividb · GitHub
[go: up one dir, main page]

Skip to content

Read-only scripts and SCRIPT LOAD move the replication offset (a SELECT is propagated for them) #705

Closed

Description

@murtazayusuf

Found reviewing #699. A read-only script's SELECT is propagated as a bare SELECT n: two EVAL_RO calls that SELECT moved the master offset by 46 bytes, and SCRIPT LOAD moves it too, while Redis's offset stays at 0 for both. No write can land in the wrong database (writes carry their own SELECT), but replicas and WAIT see offset changes for commands that wrote nothing. Fix: don't propagate a SELECT from a script that wrote nothing (handler.rs, the commands_for_propagation block, ~line 830).

Activity

  1. murtazayusuf commented on Nov 14, 2026

    @murtazayusuf
    ContributorAuthor

    Tagged good first issue: the fix is in one place (handler.rs, the commands_for_propagation block around line 830: don't propagate a script's SELECT when the script wrote nothing). A good PR adds a test that runs EVAL_RO with a SELECT and SCRIPT LOAD and checks master_repl_offset in INFO replication doesn't move, the same as Redis 8.10. Comment here before starting.

  2. added a commit that references this issue on Nov 15, 2026
    931f73b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0