[jboss-jira] [JBoss JIRA] (DROOLS-1537) Scheduled activations are rescheduled as if new when unmarshalling session in Drools 6.5
Mario Fusco (JIRA)
issues at jboss.org
Wed Apr 26 09:19:00 EDT 2017
[ https://issues.jboss.org/browse/DROOLS-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398448#comment-13398448 ]
Mario Fusco commented on DROOLS-1537:
-------------------------------------
Fixed by https://github.com/kiegroup/drools/commit/a1546a142a4645ad08e88bf1dfee090a53cf035f
Regarding deserializing using a KieBase instance that is different from the one used for serialization this is also possible and works as expected ( as demonstrated by the test case I added here https://github.com/kiegroup/drools/blob/a1546a142a4645ad08e88bf1dfee090a53cf035f/drools-compiler/src/test/java/org/drools/compiler/integrationtests/marshalling/MarshallingTest.java#L2891 ) provided that the 2 KieBases are identical.
This is indeed what you also did in your reproducer. What confused me is that you created 2 distinct kjars with same drls. Normally you don't do that: you have a single kjar and reload it from the maven repo when your app restarts. You do a newer version only if you change something, but in that case you need to use the KieScanner to trigger an incremental update of the KieBase in use.
> Scheduled activations are rescheduled as if new when unmarshalling session in Drools 6.5
> ----------------------------------------------------------------------------------------
>
> Key: DROOLS-1537
> URL: https://issues.jboss.org/browse/DROOLS-1537
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.5.0.Final
> Reporter: Kay J
> Assignee: Mario Fusco
> Attachments: RestoreReproducer.java
>
>
> Ticket representing question/bug from drools user group: https://groups.google.com/forum/#!topic/drools-usage/Gy3uhkh6J78
> Hello Drools users,
> I found an anomaly in Drools 6.5. I insert an Event, which triggers a rule with a timer after some time. For backup reasons I marshal the session inbetween to back it up and on unmarshal it later. However, after unmarshalling it, the scheduled activations are sometimes scheduled as if just inserted (e.g. 1min scheduling, with marshal/unmarshal after 25s results in the activation firing after 85 (25+60) seconds instead of actual 60s. I know this worked with Drools 5.6 consistently, but now it sometimes works, sometimes not, which is indeterministic.
> I created a test reproducing this behaviour, which has changing output whenever you execute it. What the example does: It create a scheduled activation, which should trigger after 20s. After 10s the session is marshalled, destroyed and unmarshalled into a new session. After another 10s it should finally trigger. (10s + 10s -> the 20s scheduled).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list