-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ensure only deserializable cmds are written to command topic #5645
fix: ensure only deserializable cmds are written to command topic #5645
Conversation
fixes: confluentinc#5643 Ensures all commands written to the command topic can be deserialized before writing them. A non-deserializable command causes the command runner thread to die. Even restarting the server won't help as the server will stop when it hits the non-deserializable command again. This adds some level of protection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, I think this change makes sense.
@big-andy-coates could you change the target branch to 6.0.x, this would be a worthwhile fix to include in that version. |
* command will kill the command runner thread, this is a safety net to ensure commands written to | ||
* the command topic can be deserialzied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this isn't strictly true if the version reading is different than the version writing; but I'm not opposed to the extra safety net 😛
) * fix: ensure only deserializable cmds are written to command topic fixes: #5643 Ensures all commands written to the command topic can be deserialized before writing them. A non-deserializable command causes the command runner thread to die. Even restarting the server won't help as the server will stop when it hits the non-deserializable command again. This adds some level of protection. Co-authored-by: Andy Coates <big-andy-coates@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just adding my +1 that I think this makes sense
Description
fixes: #5643
Ensures all commands written to the command topic can be deserialized before writing them.
A non-deserializable command causes the command runner thread to die.
Even restarting the server won't help as the server will stop when it hits the non-deserializable command again.
This adds some level of protection.
(I know I'd previously been against this, but ... meh... maybe I was wrong ;) )
Submitting a statement to the server which the server finds it can't deserialize now results in an error and the command is, importantly, not added to the command queue:
Testing done
usual
Reviewer checklist