-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORE-16879 - replace max retry attempts with max retry window duration #1236
CORE-16879 - replace max retry attempts with max retry window duration #1236
Conversation
Jenkins build for PR 1236 build 11 Build Successful: |
"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": 1000, | ||
"default": 5 | ||
"maximum": 2147483647, | ||
"default": 120000 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this considered an API breaking change, as the flow configuration itself is modifiable by clients?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is - this should be in a new version of the schema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, unless we add maxRetryWindowDuration in a non-breaking way (as an optional config, leaving in maxRetryAttempts, even though it's non-functional).
I'll pull this change out into a new version of the corda.flow.json, I assume the new config will be version 1.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Conal - yes I think that's the right thing to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looping in @simon-johnson-r3 for his opinion here, regarding https://r3-cev.atlassian.net/wiki/spaces/CB/pages/4564091182/Making+a+Config+Change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing with Simon, we can't make breaking changes to config schema such as removing config properties due to reasons highlighted in the wiki page. I've added the new property with a default thus a non-breaking change.
cb44ddb
to
9cf0ae6
Compare
"minimum": 0, | ||
"maximum": 2147483647, | ||
"default": 120000 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GET on /config/flow
{
"section": "corda.flow",
"sourceConfig": "",
"configWithDefaults": "{\"event\":{\"maxRetries\":5,\"messageResendWindow\":60000},\"processing\":{\"cleanupTime\":600000,\"maxFlowSleepDuration\":900000,\"maxRetryAttempts\":5,\"maxRetryDelay\":16000,\"maxRetryWindowDuration\":120000},\"session\":{\"cleanupTime\":600000,\"p2pTTL\":300000,\"timeout\":1800000}}",
"schemaVersion": {
"major": 1,
"minor": 0
},
"version": 0
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
POST to /config with
{
"section": "corda.flow",
"version": 0,
"config": {
"processing":{
"maxRetryAttempts": 1,
"maxRetryWindowDuration": 1
}
},
"schemaVersion": {
"major": 1,
"minor": 0
}
}
GET /config/flow:
{
"section": "corda.flow",
"sourceConfig": "{\"processing\":{\"maxRetryAttempts\":1,\"maxRetryWindowDuration\":1}}",
"configWithDefaults": "{\"event\":{\"maxRetries\":5,\"messageResendWindow\":60000},\"processing\":{\"cleanupTime\":600000,\"maxFlowSleepDuration\":900000,\"maxRetryAttempts\":1,\"maxRetryDelay\":16000,\"maxRetryWindowDuration\":1},\"session\":{\"cleanupTime\":600000,\"p2pTTL\":300000,\"timeout\":1800000}}",
"schemaVersion": {
"major": 1,
"minor": 0
},
"version": 1
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Runtime-os change - corda/corda-runtime-os#4587