[jira] Created: (ESPER-402) Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)

View: New views
6 Messages — Rating Filter:   Alert me  

[jira] Created: (ESPER-402) Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)
----------------------------------------------------------------------------------------------------------

                 Key: ESPER-402
                 URL: http://jira.codehaus.org/browse/ESPER-402
             Project: Esper
          Issue Type: Bug
          Components: Core
    Affects Versions: 3.2
            Reporter: Thomas Bernhardt
            Priority: Minor


Can be reproduced as below.

Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc. There assigned "minor" priority.

    public void testIt()
    {
        EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
        engine.getEPAdministrator().getConfiguration().addEventType("CallWaiting", SupportBean_A.class);
        engine.getEPAdministrator().getConfiguration().addEventType("CallFinished", SupportBean_B.class);
        engine.getEPAdministrator().getConfiguration().addEventType("CallPickedUp", SupportBean_C.class);

        String pattern = "    insert into NumberOfWaitingCalls(calls)\n" +
                "    select count(*)\n" +
                "    from pattern[every call=ConcurrentModificationExceptionCallWaiting ->\n" +
                "        (not CallFinished(id=call.id) and\n" +
                "        not CallPickedUp(id=call.id))]";
        engine.getEPAdministrator().createEPL(pattern);

        engine.getEPRuntime().sendEvent(new SupportBean_A("A1"));
        engine.getEPRuntime().sendEvent(new SupportBean_B("B1"));
        engine.getEPRuntime().sendEvent(new SupportBean_C("C1"));        
    }


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (ESPER-402) Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/ESPER-402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=192631#action_192631 ]

Thomas Bernhardt commented on ESPER-402:
----------------------------------------

Note no multiple threads required, it is a question of stopping AND-operator child nodes and removing nodes from the active list in the same loop, single thread.

> Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ESPER-402
>                 URL: http://jira.codehaus.org/browse/ESPER-402
>             Project: Esper
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.2
>            Reporter: Thomas Bernhardt
>            Priority: Minor
>
> Can be reproduced as below.
> Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc. There assigned "minor" priority.
>     public void testIt()
>     {
>         EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
>         engine.getEPAdministrator().getConfiguration().addEventType("CallWaiting", SupportBean_A.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallFinished", SupportBean_B.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallPickedUp", SupportBean_C.class);
>         String pattern = "    insert into NumberOfWaitingCalls(calls)\n" +
>                 "    select count(*)\n" +
>                 "    from pattern[every call=ConcurrentModificationExceptionCallWaiting ->\n" +
>                 "        (not CallFinished(id=call.id) and\n" +
>                 "        not CallPickedUp(id=call.id))]";
>         engine.getEPAdministrator().createEPL(pattern);
>         engine.getEPRuntime().sendEvent(new SupportBean_A("A1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_B("B1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_C("C1"));        
>     }

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Updated: (ESPER-402) Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/ESPER-402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Bernhardt updated ESPER-402:
-----------------------------------

    Attachment: TestCoModificationException.java

> Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ESPER-402
>                 URL: http://jira.codehaus.org/browse/ESPER-402
>             Project: Esper
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.2
>            Reporter: Thomas Bernhardt
>            Priority: Minor
>         Attachments: TestCoModificationException.java
>
>
> Can be reproduced as below.
> Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc. There assigned "minor" priority.
>     public void testIt()
>     {
>         EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
>         engine.getEPAdministrator().getConfiguration().addEventType("CallWaiting", SupportBean_A.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallFinished", SupportBean_B.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallPickedUp", SupportBean_C.class);
>         String pattern = "    insert into NumberOfWaitingCalls(calls)\n" +
>                 "    select count(*)\n" +
>                 "    from pattern[every call=ConcurrentModificationExceptionCallWaiting ->\n" +
>                 "        (not CallFinished(id=call.id) and\n" +
>                 "        not CallPickedUp(id=call.id))]";
>         engine.getEPAdministrator().createEPL(pattern);
>         engine.getEPRuntime().sendEvent(new SupportBean_A("A1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_B("B1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_C("C1"));        
>     }

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (ESPER-402) Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/ESPER-402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=192873#action_192873 ]

Thomas Bernhardt commented on ESPER-402:
----------------------------------------

i received the ConcurrentMoficationException using esper 3.1.0 for the
following simple pattern.  will there a quick patch for this exception?
what is the alternative to achieve the same output from the following
pattern?  thanks!

pattern:
every a=A -> (not b=B(a.stringAttr=b.stringAttr) and not
c=C(a.stringAttr=c.stringAttr)) and timer:interval(10)

events:
event[A0]: longAttr(0),doubleAttr(0), stringAttr(1), timeAttrInMilli(0)
event[B0]: longAttr(0),doubleAttr(0), stringAttr(1), timeAttrInMilli(0)
event[A1]: longAttr(0),doubleAttr(0), stringAttr(11), timeAttrInMilli(0)
event[C0]: longAttr(0),doubleAttr(0), stringAttr(11), timeAttrInMilli(0)
event[A2]: longAttr(0),doubleAttr(0), stringAttr(111), timeAttrInMilli(0)

> Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ESPER-402
>                 URL: http://jira.codehaus.org/browse/ESPER-402
>             Project: Esper
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.2
>            Reporter: Thomas Bernhardt
>            Priority: Minor
>         Attachments: TestCoModificationException.java
>
>
> Can be reproduced as below.
> Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc. There assigned "minor" priority.
>     public void testIt()
>     {
>         EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
>         engine.getEPAdministrator().getConfiguration().addEventType("CallWaiting", SupportBean_A.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallFinished", SupportBean_B.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallPickedUp", SupportBean_C.class);
>         String pattern = "    insert into NumberOfWaitingCalls(calls)\n" +
>                 "    select count(*)\n" +
>                 "    from pattern[every call=ConcurrentModificationExceptionCallWaiting ->\n" +
>                 "        (not CallFinished(id=call.id) and\n" +
>                 "        not CallPickedUp(id=call.id))]";
>         engine.getEPAdministrator().createEPL(pattern);
>         engine.getEPRuntime().sendEvent(new SupportBean_A("A1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_B("B1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_C("C1"));        
>     }

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Updated: (ESPER-402) Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/ESPER-402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Bernhardt updated ESPER-402:
-----------------------------------

    Fix Version/s: 4.0 - requires JDK6

schedule for 4.0 release

> Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ESPER-402
>                 URL: http://jira.codehaus.org/browse/ESPER-402
>             Project: Esper
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.2
>            Reporter: Thomas Bernhardt
>            Priority: Minor
>             Fix For: 4.0 - requires JDK6
>
>         Attachments: TestCoModificationException.java
>
>
> Can be reproduced as below.
> Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc. There assigned "minor" priority.
>     public void testIt()
>     {
>         EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
>         engine.getEPAdministrator().getConfiguration().addEventType("CallWaiting", SupportBean_A.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallFinished", SupportBean_B.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallPickedUp", SupportBean_C.class);
>         String pattern = "    insert into NumberOfWaitingCalls(calls)\n" +
>                 "    select count(*)\n" +
>                 "    from pattern[every call=ConcurrentModificationExceptionCallWaiting ->\n" +
>                 "        (not CallFinished(id=call.id) and\n" +
>                 "        not CallPickedUp(id=call.id))]";
>         engine.getEPAdministrator().createEPL(pattern);
>         engine.getEPRuntime().sendEvent(new SupportBean_A("A1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_B("B1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_C("C1"));        
>     }

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Resolved: (ESPER-402) Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/ESPER-402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Bernhardt resolved ESPER-402.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 4.0 - requires JDK6)
                   3.3

Bug fix in release 3.3

> Pattern with two NOT-operators connected by AND-operator throws ConcurrentModificationException (1 thread)
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ESPER-402
>                 URL: http://jira.codehaus.org/browse/ESPER-402
>             Project: Esper
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.2
>            Reporter: Thomas Bernhardt
>            Priority: Minor
>             Fix For: 3.3
>
>         Attachments: TestCoModificationException.java
>
>
> Can be reproduced as below.
> Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc. There assigned "minor" priority.
>     public void testIt()
>     {
>         EPServiceProvider engine = EPServiceProviderManager.getDefaultProvider();
>         engine.getEPAdministrator().getConfiguration().addEventType("CallWaiting", SupportBean_A.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallFinished", SupportBean_B.class);
>         engine.getEPAdministrator().getConfiguration().addEventType("CallPickedUp", SupportBean_C.class);
>         String pattern = "    insert into NumberOfWaitingCalls(calls)\n" +
>                 "    select count(*)\n" +
>                 "    from pattern[every call=ConcurrentModificationExceptionCallWaiting ->\n" +
>                 "        (not CallFinished(id=call.id) and\n" +
>                 "        not CallPickedUp(id=call.id))]";
>         engine.getEPAdministrator().createEPL(pattern);
>         engine.getEPRuntime().sendEvent(new SupportBean_A("A1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_B("B1"));
>         engine.getEPRuntime().sendEvent(new SupportBean_C("C1"));        
>     }

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email