Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-321

Unnecessary update using the TMS in EQUALITY mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.0.1.Final
    • None
    • None
    • None

      Having a class where some attributes are @key, but not all of them in EQUALITY mode it is possible to have a family of equivalent (by equality) facts which are not the same (by identity). The TMS will consider them equivalent, and use one of them as the "prime". When the justification for this prime fact goes away the second takes its place as prime. However if the SAME (by ID) fact was justified by two or more rules, there would be multiple entries in the list being the SAME by identity and the update would not be necessary.

      This is fixable in SimpleBeliefSystem by adding the condition:

      && node.getObject() != bfh.getObject()

      at line 79 of the delete method. However other BeliefSystems need to be checked and fixed as well.

              mfusco@redhat.com Mario Fusco
              mfusco@redhat.com Mario Fusco
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: