Refactor internal slave terminology to replica by kairosci · Pull Request #14923 · redis/redis

This PR renames internal slave terminology to replica as part of the ongoing migration effort.

This change is internal only and does not affect the wire protocol or public API.
It addresses the structural changes required for issue #14818.

Note

Medium Risk
Broad mechanical renaming across replication/cluster/sentinel touches many call sites and state constants, so mistakes could break replication state transitions or replica accounting despite no intended behavior change.

Overview
Refactors internal terminology from slave to replica across the codebase, including renaming SLAVE_STATE_* to REPLICA_STATE_*, CLIENT_TYPE_SLAVE to CLIENT_TYPE_REPLICA, and many helpers (for example replicationFeedSlavesreplicationFeedReplicas, disconnectSlavesdisconnectReplicas, refreshGoodSlavesCountrefreshGoodReplicasCount).

Updates core replication, networking write paths, cluster/ASM slot-migration logic, RDB/AOF save flows, eviction/expiry handling, module APIs, and Sentinel failover selection to use the new identifiers and server.replicas-based tracking (including related config/state fields like repl_ping_replica_period, replicaseldb, and repl_good_replicas_count).

Written by Cursor Bugbot for commit 2d7e9a4. This will update automatically on new commits. Configure here.