Bug 1051463 - Saving a rule file should not cause a Data Model Oracle rebuild
Summary: Saving a rule file should not cause a Data Model Oracle rebuild
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: DR4
: 6.1.0
Assignee: Toni Rikkola
QA Contact: Marián Macik
URL:
Whiteboard:
: 1045358 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-10 10:45 UTC by Toni Rikkola
Modified: 2020-03-27 18:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 18:35:15 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1094284 0 high CLOSED Exception thrown when switching to BPM Example project in Project Explorer 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1106469 0 high CLOSED Project authoring is getting significantly slower with increasing number of packages and rules 2021-02-22 00:41:40 UTC

Internal Links: 1094284 1106469

Description Toni Rikkola 2014-01-10 10:45:35 UTC
Description of problem:
Currently we do a DMO rebuild everytime a rule is saved. This is because we use this to get the rule names for the different dropdowns in our guided editors. Building a DMO is how ever heavy and we should try to avoid this. 

A better solution is to parse the rule from a generated DRL each time we do a rule file save. Rule file types are .rdrl, .drl, .gdst and so on.

Comment 2 Edson Tirelli 2014-01-10 13:31:57 UTC
This ticket needs to be included in 6.0.1.

Comment 3 Toni Rikkola 2014-03-26 08:33:00 UTC
*** Bug 1045358 has been marked as a duplicate of this bug. ***

Comment 4 Toni Rikkola 2014-04-14 09:58:01 UTC
master:
https://github.com/droolsjbpm/guvnor/commit/f416da94c2153e50a81eabf078eb603d1d182e31
https://github.com/droolsjbpm/guvnor/commit/ee104c1dcf308928d13bade95ffa40776b47333a

https://github.com/droolsjbpm/kie-wb-common/commit/e496fd2b5043d2991e7c96982a33e20eaf3aae7f
https://github.com/droolsjbpm/kie-wb-common/commit/6dda6e584636440fa14f9f3473f7a2735559ee35https://github.com/droolsjbpm/kie-wb-common/commit/fe9af8a36eebf91a2a5d73a2568702c533c2629e
https://github.com/droolsjbpm/kie-wb-common/commit/1d2d55bab3de264560ad6fc108a0461ce64da7cc
https://github.com/droolsjbpm/kie-wb-common/commit/63125805b2b1d98f647310c01c753ac902d82dd5
https://github.com/droolsjbpm/kie-wb-common/commit/3b3e67c0e1ffa2383effccf45d71dab3c9520cc2
https://github.com/droolsjbpm/kie-wb-common/commit/47bc8d640994752fa90e573e943041432d9c8a1b

https://github.com/droolsjbpm/drools-wb/commit/49db7190a38c7aed554d794aab9a5b81f380ff95
https://github.com/droolsjbpm/drools-wb/commit/c787c4b66608b8c071d824e5b59b16291da261c6
https://github.com/droolsjbpm/drools-wb/commit/215f122d22dec741ad8b67b67118e21b14643357

6.0.x:
https://github.com/droolsjbpm/guvnor/commit/4c1e1066b8a8842575092982e5a66592b215f267
https://github.com/droolsjbpm/guvnor/commit/4b7ba6d91ce0aed9c4863683064b8a002bc3e0a8

https://github.com/droolsjbpm/kie-wb-common/commit/3ed96ccc08e6f97e53410f796af1f52fa0a1b4c9
https://github.com/droolsjbpm/kie-wb-common/commit/1badfd0defa5d8279396bc0482ac6edb8ace0a1d
https://github.com/droolsjbpm/kie-wb-common/commit/5fad2af19b02ce0c22207fa8aa40b97c3ff5c2f8
https://github.com/droolsjbpm/kie-wb-common/commit/e96e563666c26031df29c115f31ea26f51c2322c
https://github.com/droolsjbpm/kie-wb-common/commit/d631cdfa89da7560d1ada591d8c36e508baa68c2
https://github.com/droolsjbpm/kie-wb-common/commit/8f4229486a5d7be88b6fe5f9efaa3f196cda1e9d
https://github.com/droolsjbpm/kie-wb-common/commit/c6b76ebda2064390c3151434460bba5995e83302

https://github.com/droolsjbpm/drools-wb/commit/a033a046c3b6ee18137f57bba19a51b8a3f232e3
https://github.com/droolsjbpm/drools-wb/commit/77499340190659b33c80df08c17f53ff7ec32622
https://github.com/droolsjbpm/drools-wb/commit/3a074ce08aa7b743b7e0837fb1925d863529a13c

Comment 5 Toni Rikkola 2014-04-15 08:09:52 UTC
More tests just to verify the code works. No fix was needed.

master:
https://github.com/droolsjbpm/kie-wb-common/commit/6e76dfd7e

6.0.x:
https://github.com/droolsjbpm/kie-wb-common/commit/193c16818

Comment 6 Toni Rikkola 2014-04-15 08:59:09 UTC
ClassCastExceptions fixed.

master:
https://github.com/droolsjbpm/drools-wb/commit/4cbf9f636

6.0.x:
https://github.com/droolsjbpm/drools-wb/commit/4c26b8398

Comment 7 Toni Rikkola 2014-04-23 09:56:34 UTC
Rule Name service was searching for rules inside dot files. Those should be ignored. Fix is here.

master
https://github.com/droolsjbpm/kie-wb-common/commit/dea975e02

6.0.x
https://github.com/droolsjbpm/kie-wb-common/commit/64ccd08cd

Comment 8 Jiri Locker 2014-05-13 15:17:07 UTC
After consulting Toni, this seems not to be fixed completely as the following statement is still logged after saving a rule file:

17:02:26,854 INFO  [org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (pool-11-thread-4) KieModule was added:MemoryKieModule[ ReleaseId=mortgages:mortgages:0.0.1]

Moreover, although it may not be related, the commit https://github.com/droolsjbpm/kie-wb-common/commit/64ccd08cd from comment 7 is not included in ER2 build since it was made after ER2 sync tagging.

Comment 9 Toni Rikkola 2014-05-14 06:06:33 UTC
Looks like part of the problem is that I didn't remove the rule formats from ResourceChangeObserver observables. The actual rule names should be working correctly and Builder no longer updates these for the DMO/rule name service, just the lines here are causing a rebuild.

https://github.com/droolsjbpm/guvnor/blob/master/guvnor-project/guvnor-project-builder/src/main/java/org/guvnor/common/services/builder/ResourceChangeObserver.java#L156

Comment 10 Toni Rikkola 2014-06-23 09:29:26 UTC
> 17:02:26,854 INFO  [org.drools.compiler.kie.builder.impl.KieRepositoryImpl]
> (pool-11-thread-4) KieModule was added:MemoryKieModule[
> ReleaseId=mortgages:mortgages:0.0.1]
> 

This can still be seen in the logs. However since the lines mentioned in Comment 9 are removed the DMO cache is not invalidated and there is no need for a DMO rebuild. Rebuild for the KBase is needed since any file added into the project goes into the KBase.

master:
https://github.com/droolsjbpm/guvnor/commit/ce2b348ac

6.1.x
https://github.com/droolsjbpm/guvnor/commit/cf52c79ac5a02fe7660814475f6326b4244efeca

Comment 11 Marián Macik 2015-03-27 15:27:21 UTC
I have created different rule types and saved them a couple of times and I haven't seen DMO rebuild in the logs. Only "KieModule was added..." messages have been present when I have tried to validate the rules etc. Therefore I will mark it as verified (on 6.1.0.CR1).


Note You need to log in before you can comment on or make changes to this bug.