Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4331#discussion_r132166483
  
    --- Diff: 
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java ---
    @@ -157,15 +157,28 @@
         */
        private boolean nfaChanged;
     
    +   /**
    +    * Store the skip strategy.
    +    */
    +   private AfterMatchSkipStrategy afterMatchSkipStrategy;
    --- End diff --
    
    I would not add it to NFA. I think it is a static data, that should not be 
serialized each time with `NFA`. We already have problems to remove `State`s, 
`Condition`s and `handleTimeout` from serializing within `NFA`. It also makes 
maintaining serializing compatbility hard. How about adding it to the 
`NFAFactory` and passing it to `NFA#process`(It is the only place where it is 
needed).
    
    I know it will require passing it in multiple places e.g. 
`KeyedCEPPatternOperator` and  'TimeoutKeyedCEPPatternOperator` but it will be 
easier after #4320.


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

Reply via email to