kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias J. Sax (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-4750) KeyValueIterator returns null values
Date Mon, 26 Jun 2017 23:17:01 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16063956#comment-16063956

Matthias J. Sax commented on KAFKA-4750:

I think [~damianguy] or [~enothereska] can comment best in this. AFAIK, we use {{put(key,null)}}
with delete-semantics all over the place. Also for {{KTable}} caches. As it align with changelog
delete semantics I also think it does make sense to keep it this way. I would rather educate
user that plug in Serde to not return {{null}} if input is not {{null}}. We can also add checks
to all {{Serde}} calls: (1) never call Serde for {{null}} as we know it must be {{null}} anyway
(2) if we call Serde with not-null, make sure it does not return {{null}} -- otherwise throw

> KeyValueIterator returns null values
> ------------------------------------
>                 Key: KAFKA-4750
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4750
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions:,,
>            Reporter: Michal Borowiecki
>            Assignee: Evgeny Veretennikov
>              Labels: newbie
>         Attachments: DeleteTest.java
> The API for ReadOnlyKeyValueStore.range method promises the returned iterator will not
return null values. However, after upgrading from to we found null values
are returned causing NPEs on our side.
> I found this happens after removing entries from the store and I found resemblance to
SAMZA-94 defect. The problem seems to be as it was there, when deleting entries and having
a serializer that does not return null when null is passed in, the state store doesn't actually
delete that key/value pair but the iterator will return null value for that key.
> When I modified our serilizer to return null when null is passed in, the problem went
away. However, I believe this should be fixed in kafka streams, perhaps with a similar approach
as SAMZA-94.

This message was sent by Atlassian JIRA

View raw message