[midPoint-git] [Evolveum/midpoint] 02d28e: Improve the repository cache

mederly noreply at github.com
Mon Jan 27 16:56:16 CET 2025


  Branch: refs/heads/tmp/testing-repo-cache-4.9
  Home:   https://github.com/Evolveum/midpoint
  Commit: 02d28ed46f72905ff86eb011cc900c9c6cb34990
      https://github.com/Evolveum/midpoint/commit/02d28ed46f72905ff86eb011cc900c9c6cb34990
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2025-01-27 (Mon, 27 Jan 2025)

  Changed paths:
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/GetOperationOptions.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/SearchResultList.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/SearchResultMetadata.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/ObjectTypes.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/global/AbstractGlobalCache.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/global/GlobalCacheObjectValue.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/global/GlobalCacheQueryValue.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/global/GlobalQueryCache.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/BaseOpHandler.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CacheAccessInfo.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CacheSetAccessInfo.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CacheSetAccessInfoFactory.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CacheUpdater.java
    A repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CacheUseMode.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CachedOpExecution.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CachedOpHandler.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CachingResultHandler.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/GetObjectOpExecution.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/GetObjectOpHandler.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/GetVersionOpExecution.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/GetVersionOpHandler.java
    R repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/PassReason.java
    A repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/RecordingResultHandler.java
    R repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/ReportingResultHandler.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/SearchOpExecution.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/SearchOpHandler.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/invalidation/ChangeDescription.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/invalidation/Invalidator.java
    A repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/local/LocalCacheObjectValue.java
    A repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/local/LocalCacheQueryValue.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/local/LocalObjectCache.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/local/LocalQueryCache.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/local/QueryKey.java
    A repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/local/SingleTypeQueryKey.java
    A repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/values/CachedObjectValue.java
    A repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/values/CachedQueryValue.java
    M repo/repo-cache/src/test/java/com/evolveum/midpoint/repo/cache/TestRepositoryCache.java

  Log Message:
  -----------
  Improve the repository cache

This commit aims to improve repo cache functionality and performance:

1. Allowing to return data that were requested with "exclude" retrieval
option (if they are present in the cache). This is needed e.g. when
serving queries from AssignmentTargetSearch (full exclusion).

2. Allowing to return data that were requested with "include" retrieval
option (if they are present in the cache, and do not contain any
incomplete items). This implements MID-6003.

3. Splitting query cache into per-type caches, aiming to more efficient
invalidation: we no longer need to iterate through all queries, but only
to ones for relevant types (supertypes + given type + subtypes).

The exclude/include items handling (plus existing zero-staleness option
handling) was implemented by replacing PassReason with CacheUseMode,
facilitating separate "can use cached data" and "can update cache"
conditions.

Work in progress.


  Commit: da28226f67e7a826e07270bcf70ff35e65a24aa1
      https://github.com/Evolveum/midpoint/commit/da28226f67e7a826e07270bcf70ff35e65a24aa1
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2025-01-27 (Mon, 27 Jan 2025)

  Changed paths:
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CacheUpdater.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CacheUseMode.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/CachingResultHandler.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/GetObjectOpHandler.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/GetVersionOpHandler.java
    M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/SearchOpHandler.java
    M repo/repo-cache/src/test/java/com/evolveum/midpoint/repo/cache/TestRepositoryCache.java

  Log Message:
  -----------
  Support "exclude" search options in repo cache

Previous repo cache improvements did not completely support
the "retrieve=exclude" option when searching for objects:
they stored OIDs instead of full objects in the search result,
but did not discriminate between "cannot update objects cache"
and "cannot update query cache" situations, which is crucial
for supporting this scenario.

This commit fixes that, evaluating the ability to update object,
version, and query caches separately. The "don't retrieve" option
in AssignmentTargetSearchExpressionEvaluator now plays well with
the repo cache.


Compare: https://github.com/Evolveum/midpoint/compare/02d28ed46f72%5E...da28226f67e7

To unsubscribe from these emails, change your notification settings at https://github.com/Evolveum/midpoint/settings/notifications


More information about the midPoint-svn mailing list