4 Replies Latest reply on Feb 15, 2013 8:38 AM by Sanjeev Gour

    Reusable executions are being created everytime

    Sanjeev Gour Novice

      After applying the patch for issue https://issues.jboss.org/browse/TEIID-2322  , for one of our cases, the ReusableExecution is being created everytime the continuous query is executed. The query is a call to a stored procedure which gets executed every 2 seconds by joining to another time table. Based on your comments for the above mentioned issue, we have seen the command is not being changed in the reset method.  However this call always returns null every time the command is executed-

       

      Execution exec = this.requestMsg.getCommandContext().getReusableExecution(this.manager.getId());

       

      This is because this.globalState.reusableExecutions in the CommandContext.getReusableExecution always returns null in this case.

       

      While we are debugging it further and trying to prepare a test case, posting this message here for any clues for further debugging.

       

      Thanks.

        • 1. Re: Reusable executions are being created everytime
          Steven Hawkins Master

          Sanjeev,

           

          As long as the execution is being closed it is eligible for reuse.  So that would be the place to start to see if close is not being called for some reason.

           

          Steve

          • 2. Re: Reusable executions are being created everytime
            Sanjeev Gour Novice

            We did a test with a simple ReusableExecution and found that new executions are being created everytime DataNotAvailableExecption is thrown. Here is the life cycle after the recent patch for issue mentioned in this conversation was applied-

             

            TimerExecution.TimerExecution()

            TimerExecution.execute() RESULT

            TimerExecution.close()

            On Row 2013-02-15 17:41:03.421

            TimerExecution.reset()

            TimerExecution.execute() WAIT

            TimerExecution.TimerExecution()

            TimerExecution.execute() RESULT

            TimerExecution.close()

            On Row 2013-02-15 17:41:03.556

            TimerExecution.reset()

            TimerExecution.execute() WAIT

            TimerExecution.TimerExecution()

            TimerExecution.execute() RESULT

            TimerExecution.close()

            On Row 2013-02-15 17:41:03.661

            TimerExecution.reset()

            TimerExecution.execute() WAIT

            TimerExecution.TimerExecution()

            TimerExecution.execute() RESULT

            TimerExecution.close()

            On Row 2013-02-15 17:41:03.766

            TimerExecution.reset()

            TimerExecution.execute() WAIT

             

            The same test when run against the jar before the fix was applied is this-

             

            TimerExecution.TimerExecution()

            TimerExecution.execute() RESULT

            TimerExecution.close()

            On Row 2013-02-15 17:49:01.998

            TimerExecution.reset()

            TimerExecution.execute() WAIT

            TimerExecution.reset()

            TimerExecution.execute() RESULT

            TimerExecution.close()

            On Row 2013-02-15 17:49:02.123

            TimerExecution.reset()

            TimerExecution.execute() WAIT

            TimerExecution.reset()

            TimerExecution.execute() RESULT

            TimerExecution.close()

            On Row 2013-02-15 17:49:02.228

            TimerExecution.reset()

            TimerExecution.execute() WAIT

            TimerExecution.reset()

            TimerExecution.execute() RESULT

            TimerExecution.close()

            On Row 2013-02-15 17:49:02.333

            TimerExecution.reset()

            TimerExecution.execute() WAIT

            TimerExecution.reset()

            TimerExecution.execute() RESULT

            TimerExecution.close()

            On Row 2013-02-15 17:49:02.438

            TimerExecution.reset()

            TimerExecution.execute() WAIT

            TimerExecution.reset()

             

             

            We created a JIRA ticket for this and attached the testcase to reproduce it.

             

            https://issues.jboss.org/browse/TEIID-2395

            • 3. Re: Reusable executions are being created everytime
              Steven Hawkins Master

              I rejected the issue as I believe that your patch was applied incorrectly.  Please retry your scenario against latest.

               

              Steve