You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2016/08/19 16:57:40 UTC

[GitHub] flink issue #2367: [FLINK-3703][cep] Add sequence matching semantics to disc...

Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/2367
  
    Thanks for your contribution and apologies for the late review @mushketyk. I think your implementation goes into the right direction and I really like the testing.
    
    I think what we still can and should improve is to pull out the `MatchingBehaviour` out of the `SharedBuffer` and the `State`. The `NFA` should be the only component which is responsible for the matching behaviour. I think we can achieve this if we pimp the `SharedBuffer` a little bit.
    
    So what should roughly happen is that the `NFA` removes computation states which are not longer valid. Furthermore, we have to clean up the `SharedBuffer` and remove `SharedBufferEntries` which depend on other `SharedBufferEntries` which are no longer valid (e.g. due to `MatchingBehaviour.afterLast`). 
    
    So when you have a `SharedBufferEntry` representing a certain state which is part of the currently matched sequence and `MatchingBehaviour.afterLast`, then you have to find out all `SharedBufferEntries` which depend on this state (children) and remove them. That you have to do until you reach the youngest descendant. Currently we can only find the predecessors for a given `SharedBufferEntry` but not the children. I think that would have to be added in order to implement the different `MatchingBehaviours`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---