Skip to content

Commit

Permalink
Schema cleanup: InternalsConfigurationType.subresultStripThreshold
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Oct 1, 2021
1 parent 1755002 commit e62a628
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2437,11 +2437,9 @@ private static OperationResultImportanceType getPreserveDuringCleanup() {
}

public static void applyOperationResultHandlingStrategy(
@NotNull List<OperationResultHandlingStrategyType> configuredStrategies, Integer stripThresholdDeprecated) {
@NotNull List<OperationResultHandlingStrategyType> configuredStrategies) {
if (!configuredStrategies.isEmpty()) {
handlingStrategies = CloneUtil.cloneCollectionMembers(configuredStrategies);
} else if (stripThresholdDeprecated != null) {
handlingStrategies = singletonList(new OperationResultHandlingStrategyType().subresultStripThreshold(stripThresholdDeprecated));
} else {
handlingStrategies = singletonList(DEFAULT_HANDLING_STRATEGY);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15387,6 +15387,11 @@
</xsd:documentation>
<xsd:appinfo>
<a:container/>
<a:schemaMigration>
<a:element>tns:subresultStripThreshold</a:element>
<a:version>4.4</a:version>
<a:operation>removed</a:operation>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
Expand Down Expand Up @@ -15422,27 +15427,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="subresultStripThreshold" type="xsd:int" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
When aggregation of the same subresults (same operation and status) is to be applied,
during operation result "summarize" operation.
(Default: 10.)

TEMPORARY/EXPERIMENTAL. We plan to provide more elaborate operation result aggregation strategies.
This is just a quick way how to reduce large operation results for some deployments.

DEPRECATED. Use operationResultHandlingStrategy instead.
</xsd:documentation>
<xsd:appinfo>
<a:experimental>true</a:experimental>
<a:displayName>InternalsConfigurationType.subresultStripThreshold</a:displayName>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.0</a:deprecatedSince>
<a:plannedRemoval>4.4</a:plannedRemoval>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="operationResultHandlingStrategy" type="tns:OperationResultHandlingStrategyType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void testCleanup() throws Exception {
new OperationResultHandlingStrategyType(prismContext)
.name(LOCAL_1)
.preserveDuringCleanup(MAJOR)
), null);
));
OperationResult.setThreadLocalHandlingStrategy(LOCAL_1);

root.cleanupResultDeeply();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,9 @@ private void applyOperationResultHandlingConfiguration(SystemConfigurationType c
try {
if (configuration != null && configuration.getInternals() != null) {
OperationResult.applyOperationResultHandlingStrategy(
configuration.getInternals().getOperationResultHandlingStrategy(),
configuration.getInternals().getSubresultStripThreshold());
configuration.getInternals().getOperationResultHandlingStrategy());
} else {
OperationResult.applyOperationResultHandlingStrategy(Collections.emptyList(), null);
OperationResult.applyOperationResultHandlingStrategy(Collections.emptyList());
}
} catch (Throwable t) {
LoggingUtils.logUnexpectedException(LOGGER,
Expand Down

0 comments on commit e62a628

Please sign in to comment.