Github user nathanmarz commented on the pull request:

    https://github.com/apache/incubator-storm/pull/48#issuecomment-38454693
  
    Trident stores the batch id with any state it stores. It then uses this 
batch id to decide how to do updates. Opaque maps will update using the "prev 
val" if the batch id is the same, otherwise it will update using the current 
val (due to the nature of opaque semantics). Now the problem comes in when you 
do *multiple updates* to the same state in the same batch. In this case, the 
batch id will be the same on the second update, but you should update using the 
curr val instead of the prev val.
    
    The code was correct on updates but not on gets. If the value was updated 
in the batch the current val should always be returned, otherwise the standard 
opaque semantics should be done. Whether a value has had updates applied to it 
or not is detected with the "CachedBatchReadsMap".


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to