Skip to content

Conversation

@madolson
Copy link
Contributor

Centralize most of the error calls so that they actually pass through the addReplyError* type commands. Although there are some fringe benefits, like reducing memory allocations, the main benefit is to catch errors thrown from the replica and detect replication divergence.

Copy link
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

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

sorry, i'm behind on my notifications. didn't notice this one and suggested @filipecosta90 to do it in his PR.
This must be a separate commit, so i guess we can go ahead and merge it right away.
when you squash-merge this, please mention the other PR in the comment to show justification.

we now need to keep an eye for other pending PRs that add new commands (copied code from old ones), and tell everyone to adjust to this new thing.

p.s. i don't see any performance or memory degradation. am i missing something?

@madolson
Copy link
Contributor Author

Just to circle back, I did double check the performance with benchmarks, and I couldn't find anything one way or the other.

@madolson madolson merged commit efaf09e into redis:unstable Dec 24, 2020
DebugNinjaSlayer pushed a commit to DebugNinjaSlayer/redis that referenced this pull request Dec 27, 2020
Properly throw errors for invalid replication stream and support redis#8217
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Mar 2, 2021
Properly throw errors for invalid replication stream and support redis#8217
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