Skip to content

Conversation

@maxzheng
Copy link
Contributor

So it looks good and then we look good. :) Otherwise, it's more readable and promotes good practice as many will copy/paste.

So it looks good and then we look good. :) Otherwise, it's more readable
and promotes good practice as many will copy/paste.
@maxzheng maxzheng requested a review from a team March 23, 2018 21:56
@ghost
Copy link

ghost commented Mar 23, 2018

@confluentinc It looks like @maxzheng just signed our Contributor License Agreement. 👍

Always at your service,

clabot

Copy link
Contributor

@edenhill edenhill left a comment

Choose a reason for hiding this comment

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

Good stuff Max!
Just one small thing that needs fixing (which was broken before too..)

README.md Outdated
print("Message deserialization failed for {}: {}".format(msg, e))
break

if msg:
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that the original code has a bug:
Bool comparison operator calls _msg.len, which is implemented to return the number of bytes of the message value. Tombstone messages however have a null value (but a non-empty key) and thus a len of 0, which will make these messages ignored by this code.

So this should be changed to:

   if msg is None:
       continue
   if msg.error():
...

@maxzheng
Copy link
Contributor Author

Ping @edenhill

@edenhill
Copy link
Contributor

Thank you for this!

@edenhill edenhill merged commit d395b73 into confluentinc:master Mar 27, 2018
@maxzheng maxzheng deleted the restructure-code@master branch March 28, 2018 04:39
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