changefeedccl: better validation check for sarama config#118890
changefeedccl: better validation check for sarama config#118890craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
|
Sarama does the check for this here - it checks for c.Flush.Messages > 0 rather than c.Flush.Messages > 1 which I thought makes more sense. https://github.com/IBM/sarama/blob/25c9c1a880e385781e1a39b49f8e7239e3d5e729/config.go#L593-L595 |
1228c4b to
58de93e
Compare
rharding6373
left a comment
There was a problem hiding this comment.
The sarama config validator is a nice find!
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @wenyihu6)
pkg/ccl/changefeedccl/sink_kafka.go line 211 at r1 (raw file):
Previously, wenyihu6 (Wenyi Hu) wrote…
Sarama does the check for this here - it checks for c.Flush.Messages > 0 rather than c.Flush.Messages > 1 which I thought makes more sense.
https://github.com/IBM/sarama/blob/25c9c1a880e385781e1a39b49f8e7239e3d5e729/config.go#L593-L595
👍
|
Previously, rharding6373 (Rachael Harding) wrote…
I just realized that sarama doesn't return an error in this case but just outputs a warning https://github.com/IBM/sarama/blob/25c9c1a880e385781e1a39b49f8e7239e3d5e729/config.go#L594. I will the validation back. It does return error for improper client id though. I will add a test for this in the other PR. |
58de93e to
a63b4dc
Compare
|
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
rharding6373
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @wenyihu6)
pkg/ccl/changefeedccl/sink_kafka.go line 211 at r1 (raw file):
Previously, wenyihu6 (Wenyi Hu) wrote…
I just realized that sarama doesn't return an error in this case but just outputs a warning https://github.com/IBM/sarama/blob/25c9c1a880e385781e1a39b49f8e7239e3d5e729/config.go#L594. I will the validation back. It does return error for improper client id though. I will add a test for this in the other PR.
Could you add a note in the comment to the effect of "Note that the sarama config validator only logs an error in this case, so we check explicitly."
Previously, we implement our own validation check for sarama config which may have missed certain cases. This patch changes an additional check by adding sarama's own exported validation function. Release note: none Epic: none
a63b4dc to
29f256d
Compare
|
Previously, rharding6373 (Rachael Harding) wrote…
Done. |
|
TFTRs!! bors r=rharding6373 |
|
Build succeeded: |
Previously, we implement our own validation check for sarama config which may
have missed certain cases. This patch changes an additional check by adding
sarama's own exported validation function.
Release note: none
Epic: none