[midPoint-git] [Evolveum/midpoint] 00a49a: Don't use `Throwable` in `catch` statement
mederly
noreply at github.com
Tue Jan 28 09:59:07 CET 2025
Branch: refs/heads/support-4.9
Home: https://github.com/Evolveum/midpoint
Commit: 00a49abab71cce8d83137a6470f8e4fb068bc9fb
https://github.com/Evolveum/midpoint/commit/00a49abab71cce8d83137a6470f8e4fb068bc9fb
Author: Andrej Zan <andrej.zan at evolveum.com>
Date: 2025-01-28 (Tue, 28 Jan 2025)
Changed paths:
M repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/invalidation/ChangeDescription.java
Log Message:
-----------
Don't use `Throwable` in `catch` statement
**Why**
Catching `Throwable` to "catch them all" is a bad practice, because it
catches also `Error`'s which in general, should not be catched, because
you "usuealy" can not do anything with them.
(cherry picked from commit f56b9d4f14d9160a78e5d5410c8f8fc41ed918f4)
Commit: 8c5b50780c4dfa1fc25995be7c6257b8d7ecf392
https://github.com/Evolveum/midpoint/commit/8c5b50780c4dfa1fc25995be7c6257b8d7ecf392
Author: Pavol Mederly <mederly at evolveum.com>
Date: 2025-01-28 (Tue, 28 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: 74c418bbcd93d61e703cf0cd5c637c53b78942e2
https://github.com/Evolveum/midpoint/commit/74c418bbcd93d61e703cf0cd5c637c53b78942e2
Author: Pavol Mederly <mederly at evolveum.com>
Date: 2025-01-28 (Tue, 28 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/996a300ccc53...74c418bbcd93
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