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_r211203923
 
 

 ##########
 File path: 
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/NFATest.java
 ##########
 @@ -184,15 +185,17 @@ public void testTimeoutWindowPruningWindowBorders() 
throws Exception {
                Set<Map<String, List<Event>>> actualPatterns = new HashSet<>();
 
                SharedBuffer<Event> sharedBuffer = 
TestSharedBuffer.createTestBuffer(Event.createTypeSerializer());
-               for (StreamRecord<Event> streamEvent : inputs) {
-                       nfa.advanceTime(sharedBuffer, nfaState, 
streamEvent.getTimestamp());
-                       Collection<Map<String, List<Event>>> matchedPatterns = 
nfa.process(
-                               sharedBuffer,
-                               nfaState,
-                               streamEvent.getValue(),
-                               streamEvent.getTimestamp());
-
-                       actualPatterns.addAll(matchedPatterns);
+               try (SharedBufferAccessor<Event> sharedBufferAccessor = 
sharedBuffer.getAccessor()) {
+                       for (StreamRecord<Event> streamEvent : inputs) {
 
 Review comment:
   Accessor should not be shared between `StreamRecord`s

----------------------------------------------------------------
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

Reply via email to