xuyangzhong commented on PR #29204:
URL: https://github.com/apache/flink/pull/29204#issuecomment-5807225444

   Hi, @MartijnVisser. I think you’re right. The underlying issue is an 
inconsistency between the two states. We need to determine whether `addRecord` 
is creating a new entry or updating an existing one, then increment 
`numOfAssociations` in the corresponding state only when a new entry is created.
   To do that, maybe we could let `ValueState#update` and `MapState#put` return 
a boolean or the previous value, allowing us to distinguish between an update 
and an insertion. This may add a little read I/O overhead, but I think that’s a 
reasonable tradeoff for data correctness. WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to