[midPoint-git] [Evolveum/midpoint] ecfafe: Fix misplaced delegatedRef query

mederly noreply at github.com
Thu Mar 16 21:07:58 CET 2023


  Branch: refs/heads/master
  Home:   https://github.com/Evolveum/midpoint
  Commit: ecfafe7deca27e895dd60435e7270ab682a42f9b
      https://github.com/Evolveum/midpoint/commit/ecfafe7deca27e895dd60435e7270ab682a42f9b
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2023-03-16 (Thu, 16 Mar 2023)

  Changed paths:
    M model/cases-impl/src/main/java/com/evolveum/midpoint/cases/impl/helpers/CaseMiscHelper.java
    M model/certification-impl/src/main/java/com/evolveum/midpoint/certification/impl/AccCertUpdateHelper.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java
    M model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/other/TestMiscellaneous.java
    A model/workflow-impl/src/test/resources/miscellaneous/org-approvers.xml
    A model/workflow-impl/src/test/resources/miscellaneous/role-approved-by-org.xml

  Log Message:
  -----------
  Fix misplaced delegatedRef query

In some cases, a "delegatedRef = null" query was issued by the workflow
module, scanning through all existing users. That made approval
extremely slow.

This fixes the first part of MID-8134.


  Commit: 7e655c68d34f3d4fc856b01e8509c518491881c4
      https://github.com/Evolveum/midpoint/commit/7e655c68d34f3d4fc856b01e8509c518491881c4
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2023-03-16 (Thu, 16 Mar 2023)

  Changed paths:
    M model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processes/itemApproval/ApprovalSchemaHelper.java
    M model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/primary/aspect/BasePrimaryChangeAspect.java
    M model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/other/TestMiscellaneous.java
    A model/workflow-impl/src/test/resources/miscellaneous/role-approved-by-multiple-relations.xml
    A model/workflow-impl/src/test/resources/miscellaneous/user-approver-by-multiple-relations.xml
    M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/asserter/OperationResultRepoSearchAsserter.java

  Log Message:
  -----------
  Optimize approverRelation "OR" query

The "OR" REF query over multiple relations (specified by
`approverRelation` property) was inefficient on some databases.
(Especially for old generic repo, where multiple left joins were
used in such cases.)

It is now replaced by a set of independent queries, with the results
merged afterwards.

We assume that there will not be a large number of relations used, so
the number of queries will be low.

This resolves MID-8134.


Compare: https://github.com/Evolveum/midpoint/compare/22154448d4c9...7e655c68d34f


More information about the midPoint-svn mailing list