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

    https://github.com/apache/flink/pull/3872#discussion_r116444058
  
    --- Diff: 
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java
 ---
    @@ -96,10 +96,11 @@ public void put(
     
                // sanity check whether we've found the previous element
                if (previousSharedBufferEntry == null && previousValue != null) 
{
    -                   throw new IllegalStateException("Could not find 
previous shared buffer entry with " +
    +                   throw new IllegalStateException("Could not find 
previous entry with " +
                                "key: " + previousKey + ", value: " + 
previousValue + " and timestamp: " +
    -                           previousTimestamp + ". This can indicate that 
the element belonging to the previous " +
    -                           "relation has been already pruned, even though 
you expect it to be still there.");
    +                           previousTimestamp + ". This can indicate that 
either you did not implement " +
    +                           "the equals() and hashCode() methods of your 
input elements properly or that " +
    +                           "the element belonging to that entry has been 
already pruned.");
    --- End diff --
    
    Been thinking about this exception message and those two reasons for the 
exception come from "two different worlds". 
    
    1. if element has been pruned - from user perspective this means some error 
in CEP library occured and the user can not do much about it.
    2. the equals() and hashCode() are obvious user mistakes.
    
    Not sure if we should do sth with it, but just wanted to express my 
thoughts on it.



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