Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor: Use RedisCmd for more cluster commands#2876

Merged
michael-grunder merged 2 commits into
developfrom
refactor/cluster-commands
Jun 22, 2026
Merged

Refactor: Use RedisCmd for more cluster commands#2876
michael-grunder merged 2 commits into
developfrom
refactor/cluster-commands

Conversation

@michael-grunder

Copy link
Copy Markdown
Member

Introduce cluster_send_command_rcmd and cluster_send_command_rcmd_ex that simplifies calling logic that is currently repeatedly extracting the command and length anywy.

Additionally this lets us elide key prefixing and conditional freeing of the duplicate string at the callsites.

Introduce `cluster_send_command_rcmd` and `cluster_send_command_rcmd_ex`
that simplifies calling logic that is currently repeatedly extracting
the command and length anywy.

Additionally this lets us elide key prefixing and conditional freeing of
the duplicate string at the callsites.

Signed-off-by: michael-grunder <[email protected]>
Comment thread cluster_library.h Outdated
const char *cmd, int cmd_len);

static zend_always_inline short
cluster_send_cmd_rcmd(redisCluster *c, RedisCmd *cmd)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should it be named like cluster_send_rcmd or cluster_send_rcommand?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Both are better. I couldn't think of what to name it

@michael-grunder michael-grunder merged commit 4af1e20 into develop Jun 22, 2026
86 checks passed
@michael-grunder michael-grunder deleted the refactor/cluster-commands branch June 22, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants