Skip to content

Commit

Permalink
CORE-16879 - replace max retry attempts with max retry window duration (
Browse files Browse the repository at this point in the history
#1236)

Updates the config used to handle transient exceptions to instead use a time window.

Changes to transient exception handling mean that it is possible to exhaust a retry count very rapidly in low load scenarios. By changing to a time window solution instead, the flow code will wait a suitable amount of time before failing a flow.

Co-authored-by: James Higgs <james.higgs@r3.com>
conalsmith-r3 and JamesHR3 authored Sep 8, 2023
1 parent 14819c0 commit d4b81e2
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ private FlowConfig() {
public static final String SESSION_P2P_TTL = "session.p2pTTL";
public static final String SESSION_FLOW_CLEANUP_TIME = "session.cleanupTime";
public static final String PROCESSING_MAX_RETRY_ATTEMPTS = "processing.maxRetryAttempts";
public static final String PROCESSING_MAX_RETRY_WINDOW_DURATION = "processing.maxRetryWindowDuration";
public static final String PROCESSING_MAX_RETRY_DELAY = "processing.maxRetryDelay";
public static final String PROCESSING_MAX_FLOW_SLEEP_DURATION = "processing.maxFlowSleepDuration";
public static final String PROCESSING_FLOW_CLEANUP_TIME = "processing.cleanupTime";
Original file line number Diff line number Diff line change
@@ -18,6 +18,13 @@
"maximum": 1000,
"default": 5
},
"maxRetryWindowDuration": {
"description": "The duration in milliseconds after a transient error that Corda retries a flow before failing it. A value of zero disables retries.",
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"default": 300000
},
"maxRetryDelay": {
"description": "The maximum delay in milliseconds before Corda schedules a retry.",
"type": "integer",
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ cordaProductVersion = 5.1.0
# NOTE: update this each time this module contains a breaking change
## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to
## a per module property in which case module versions can change independently.
cordaApiRevision = 18
cordaApiRevision = 19

# Main
kotlinVersion = 1.8.21

0 comments on commit d4b81e2

Please sign in to comment.