[
http://jira.jboss.com/jira/browse/JBRULES-792?page=comments#action_12361851 ]
Edson Tirelli commented on JBRULES-792:
---------------------------------------
Dirk,
I will be able to work on this ticket this afternoon. I will get the RLIRecord from the
the JBRULES-740 ticket, as you suggested, but it would be good if you can attach to this
issue all the relevant classes for reproducing the problem. I mean, the PRRecord,
RecordSet, User and DataSource classes, as well as a class to assert the facts and fire
the rule.
If you can do that, will make it easy for me to reproduce the problem.
Thank you,
Edson
Some "collect" rules cause hang during assertion
------------------------------------------------
Key: JBRULES-792
URL:
http://jira.jboss.com/jira/browse/JBRULES-792
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.0.MR2
Reporter: Dirk Bergstrom
Assigned To: Edson Tirelli
Attachments: stacktraces.txt
Some combinations of collect rules and objects result in an endless
busy loop during assertion (100% CPU usage for 18 hours and counting).
The problem doesn't happen for every object, but it is repeatable for
a given object.
For instance, with the following rule:
rule "Find all RLIs for user"
when
$user : User( )
$rli_list : RecordSet( size > 0 ) from
collect( RLIRecord( $resp : responsible -> ( $user.hasReport($resp) ) ) )
then
$user.setRecords($rli_list, DataSource.RLI);
end
With 92 Users asserted, my code asserts the first 1368 RLI objects at 6-8
miliseconds per assertion, then hangs hard on #1369 (always the same
object). It has sat there occupying a cpu full time for the last 18
hours, with no visible progress.
On the other hand, with these two rules:
when
$release : ReleaseRecord( $relname : relname )
$user : User( )
$pr_list : RecordSet( size > 0 ) from
collect( PRRecord( releases contains $relname,
$resp : responsible -> ( $user.hasReport($resp) ) ) )
then
$user.setRecords($pr_list, $release, DataSource.GNATS);
end
rule "Find all PRs for user"
when
$user : User( )
$pr_list : RecordSet( size > 0 ) from
collect( PRRecord( $resp : responsible -> ( $user.hasReport($resp) ) ) )
then
$user.setRecords($pr_list, DataSource.GNATS);
end
With 92 Users and 37 ReleaseRecords asserted, I can assert all 10600
PR objects, at between 10 and 100 msec per (it slows down a bit
towards the end). Then on the next cycle the app asserts several
hundred more User objects, and later asserts another 1500 Users,
without a hitch.
If need be, I have examples of other rule/object combinations that do
and don't work. Note that a version of the RLIRecord class is
attached to JBRULES 740.
I'm using trunk, at revision 108xx -- forgot to note the exact
revision, but it includes tirelli's hashcode caching, and a few other
changes after that.
This is a follow-on to JBRULES 740.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira