Skip to content

Commit 5a579db

Browse files
authored
Merge pull request #27 from TheForbiddenAi/main
Decrease retry log level
2 parents 152b89f + d5cd143 commit 5a579db

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

client/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
}
1111

1212
group 'io.dapr'
13-
version = '1.5.6'
13+
version = '1.5.7'
1414
archivesBaseName = 'durabletask-client'
1515

1616
def grpcVersion = '1.69.0'

client/src/main/java/io/dapr/durabletask/TaskOrchestrationExecutor.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,19 +1183,25 @@ private boolean shouldRetry() {
11831183
boolean shouldRetryBasedOnPolicy = this.policy != null ? this.shouldRetryBasedOnPolicy() : true;
11841184
boolean shouldRetryBasedOnHandler = this.handler != null ? this.handler.handle(retryContext) : true;
11851185

1186-
if (this.policy != null) {
1187-
logger.info(() -> String.format("shouldRetryBasedOnPolicy: %s", shouldRetryBasedOnPolicy));
1188-
}
1186+
// Only log when not replaying, so only the current attempt is logged and not all previous attempts.
1187+
if(!this.context.getIsReplaying()) {
1188+
if (this.policy != null) {
1189+
logger.fine(() -> String.format("shouldRetryBasedOnPolicy: %s", shouldRetryBasedOnPolicy));
1190+
}
11891191

1190-
if (this.handler != null) {
1191-
logger.info(() -> String.format("shouldRetryBasedOnHandler: %s", shouldRetryBasedOnHandler));
1192+
if (this.handler != null) {
1193+
logger.fine(() -> String.format("shouldRetryBasedOnHandler: %s", shouldRetryBasedOnHandler));
1194+
}
11921195
}
11931196

11941197
return shouldRetryBasedOnPolicy && shouldRetryBasedOnHandler;
11951198
}
11961199

11971200
private boolean shouldRetryBasedOnPolicy() {
1198-
logger.warning(() -> String.format("Retry Policy: %d retries out of total %d performed ", this.attemptNumber, this.policy.getMaxNumberOfAttempts()));
1201+
// Only log when not replaying, so only the current attempt is logged and not all previous attempts.
1202+
if(!this.context.getIsReplaying()) {
1203+
logger.fine(() -> String.format("Retry Policy: %d retries out of total %d performed ", this.attemptNumber, this.policy.getMaxNumberOfAttempts()));
1204+
}
11991205

12001206
if (this.attemptNumber >= this.policy.getMaxNumberOfAttempts()) {
12011207
// Max number of attempts exceeded

0 commit comments

Comments
 (0)