dawidwys commented on a change in pull request #6205: [FLINK-9642]Reduce the count to deal with state during a CEP process URL: https://github.com/apache/flink/pull/6205#discussion_r211173668
########## File path: flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java ########## @@ -216,9 +217,12 @@ private boolean isFinalState(ComputationState state) { final T event, final long timestamp, final AfterMatchSkipStrategy afterMatchSkipStrategy) throws Exception { - try (EventWrapper eventWrapper = new EventWrapper(event, timestamp, sharedBuffer)) { - return doProcess(sharedBuffer, nfaState, eventWrapper, afterMatchSkipStrategy); + Collection<Map<String, List<T>>> result; + try (SharedBufferAccessor<T> sharedBufferAccessor = sharedBuffer.getAccessor(); Review comment: I think it would make more sense if in `NFA` we would always work on the `SharedBufferAccessor`. We could move the try-with-resources block to `AbstractKeyedCEPPatternOperator`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services