[midPoint-git] [Evolveum/midpoint] 2991fc: Fix memleaks caused by log capture in tracing

mederly noreply at github.com
Tue Aug 10 18:31:56 CEST 2021


  Branch: refs/heads/tmp/tracing-memleak
  Home:   https://github.com/Evolveum/midpoint
  Commit: 2991fc4f646735d978f0c6f4f2503f46f6cca766
      https://github.com/Evolveum/midpoint/commit/2991fc4f646735d978f0c6f4f2503f46f6cca766
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2021-08-10 (Tue, 10 Aug 2021)

  Changed paths:
    A infra/schema/src/main/java/com/evolveum/midpoint/schema/result/LogRecorder.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/result/OperationResult.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/executor/ProjectionChangeExecution.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/focus/AssignmentProcessor.java
    M model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/access/WorkItemManager.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/ResourceObjectConverter.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/ResourceObjectReferenceResolver.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/AddHelper.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/DeleteHelper.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ModifyHelper.java
    M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/ItemProcessingGatekeeper.java
    M repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/tracing/TracingOutputCreator.java

  Log Message:
  -----------
  Fix memleaks caused by log capture in tracing

The log capture in tracing can cause memleaks - along with mess
in the logs gathered - if the operation results are not treated
appropriately. (Which is currently the case in many places in the code.)

So this commit:
1) Simplifies and documents the log capturing mechanism.
2) Tries to reduce the scope of memleaks (should they occur) by
unlinking event sinks with operation result objects.
3) Introduces some sanity checks to the process of switching logging
sinks. These checks help to find problems in operation result handling.
4) When there is a conflict between real and expected log recorder,
we now use expected log recorder to be used, hopefully fixing any
problems stemming from bugs in code.

We also fixed some of specific places where operation result
handling was not correct.


  Commit: 4bcd0bb8a168392e988ce0de9df7c31140e4d2c6
      https://github.com/Evolveum/midpoint/commit/4bcd0bb8a168392e988ce0de9df7c31140e4d2c6
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2021-08-10 (Tue, 10 Aug 2021)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebModelServiceUtils.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/progress/ProgressPanel.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/roles/MemberOperationsHelper.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/PageTask.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/result/OperationResult.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelController.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/Clockwork.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/mapping/TestMappingAdvanced.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ProvisioningContext.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ProvisioningServiceImpl.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/EntitlementConverter.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/resourceobjects/ResourceObjectConverter.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/AccessChecker.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/AddHelper.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/DeleteHelper.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ModifyHelper.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/RefreshHelper.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/Util.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/errors/CommunicationExceptionHandler.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/errors/ErrorHandler.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/errors/MaintenanceExceptionHandler.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/manager/ShadowCreator.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/manager/ShadowUpdater.java
    M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/util/ProvisioningUtil.java
    M provisioning/ucf-api/src/main/java/com/evolveum/midpoint/provisioning/ucf/api/ObjectHandler.java
    M provisioning/ucf-impl-builtin/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/builtin/async/provisioning/AsyncProvisioningConnectorInstance.java
    M provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnIdUtil.java
    M provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/ConnectorInstanceConnIdImpl.java
    M provisioning/ucf-impl-connid/src/main/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/SearchExecutor.java
    M provisioning/ucf-impl-connid/src/test/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/TestUcfDummy.java
    M provisioning/ucf-impl-connid/src/test/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/TestUcfDummyMulti.java
    M provisioning/ucf-impl-connid/src/test/java/com/evolveum/midpoint/provisioning/ucf/impl/connid/TestUcfOpenDj.java
    M repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/tasks/TaskPersister.java

  Log Message:
  -----------
  Fix operation result handling at more places

Fixed a couple of places where operation result was not closed
(finished) correctly.

Related to MID-7164.


Compare: https://github.com/Evolveum/midpoint/compare/2991fc4f6467%5E...4bcd0bb8a168


More information about the midPoint-svn mailing list