[ https://issues.apache.org/jira/browse/KAFKA-5717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Damian Guy resolved KAFKA-5717. ------------------------------- Resolution: Fixed Fix Version/s: 0.11.0.1 1.0.0 Issue resolved by pull request 3650 [https://github.com/apache/kafka/pull/3650] > [streams] 'null' values in state stores > --------------------------------------- > > Key: KAFKA-5717 > URL: https://issues.apache.org/jira/browse/KAFKA-5717 > Project: Kafka > Issue Type: Bug > Components: streams > Affects Versions: 0.10.2.1, 0.11.0.0 > Reporter: Bart Vercammen > Assignee: Damian Guy > Fix For: 1.0.0, 0.11.0.1 > > > When restoring the state on an in-memory KeyValue store (at startup of the > Kafka Streams application), the _deleted_ values are put in the store as > _key_ with _value_ {{null}} instead of being removed from the store. > (this happens when the underlying kafka topic segment did not get compacted > yet) > After some digging I came across this in {{InMemoryKeyValueStore<K, V>}}: > {code} > public synchronized void put(K key, V value) { > this.map.put(key, value); > } > {code} > I would assume this implementation misses the check on {{value}} being > {{null}} to *delete* the entry instead of just storing it. > In the RocksDB implementation it is done correctly: > {code} > if (rawValue == null) { > try { > db.delete(wOptions, rawKey); > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)