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

A. Sophie Blee-Goldman commented on KAFKA-14123:
------------------------------------------------

[~pawan4u_sharma] , thanks for the report but I believe the code is actually 
correct as is, it's just difficult to validate because the state store class 
hierarchy is such a mess.

Basically what happens with persistent WindowStores is that the 
{{AbstractRocksDBSegmentedBytesStore}}  class that you are looking at is not 
the final base class that interfaces with the actual underlying rocksdb store. 
Technically all persistent stores, whether regular KV, Window, or Session, are 
all made up of the {{RocksDBStore}} class –  it’s just that for the windowed 
store types there are multiple instances of the {{RocksDBStore}}  connected 
together, whereas for the regular KV store there is just the one. You’ll notice 
that we do indeed check for null values and issue a delete on the innermost 
store in that class, so the code is indeed working as intended.

Closing as 'Not a Problem'

> Delete with null value not supported in Streams PersistantWindowsStore
> ----------------------------------------------------------------------
>
>                 Key: KAFKA-14123
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14123
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 3.0.0
>            Reporter: Pawan Sharma
>            Priority: Major
>
> Unable to delete an Window entry from Persistant Windows Store by passing 
> null value in the body.
>  
> Put in this class does not check if the value is null and invoke the remove 
> method.
> [https://github.com/apache/kafka/blob/3.0.0/streams/src/main/java/org/apache/kafka/streams/state/internals/AbstractRocksDBSegmentedBytesStore.java]
>  
> Where as the same feature is working in InMemoryWindowsStore, where the null 
> values are treated as delete. line no 126.
> [https://github.com/apache/kafka/blob/3.0.0/streams/src/main/java/org/apache/kafka/streams/state/internals/InMemoryWindowStore.java]
>  
> This behaviour is little in contrast to all other stores including kv stores, 
> where a null value is treated as delete and also complys with the behaviour 
> of compressed Kafka topic.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to