Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Fix InterruptedException (BackupCPS) #122

Closed
wants to merge 2 commits into from
Closed

Fix InterruptedException (BackupCPS) #122

wants to merge 2 commits into from

Conversation

matthewchivers
Copy link
Contributor

Thread interrupt was being called upon database unavailability (as in galasa-dev/projectmanagement#570).

Explanation of the problem has been added in that tagged issue.

I have added a check to see if the CompletableFuture completes with an exception (this exception signals database unavailability, at least in reference to the tagged issue), and enforce a re-try if there is an exception (with a max number of retries).

The multi-catch has also been split up so that InterruptedException and ExecutionException are treated differently.

Closes galasa-dev/projectmanagement#570 when combined with a PR being raised in galasa-dev/framework that references the same issue.

Signed-off-by: Matthew Chivers matthewchivers@outlook.com

Signed-off-by: Matthew Chivers <matthewchivers@outlook.com>
Signed-off-by: Matthew Chivers <matthewchivers@outlook.com>
@matthewchivers
Copy link
Contributor Author

Jenkins build failed, but should pass once PR galasa-dev-archives/framework#230 has been merged (ConfigurationPropertyStoreException needs to be added to interfaces).

@Michael-Baylis
Copy link
Contributor

rejected as it is masking potential coding errors. Retries should be only for specific known errors, not everything.
Also, the retry mechanism needs to be higher up in the abstraction, so that the same retry/reconnect will work for etcd and mariadb (when we get it). Also needs to be in all methods.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BackupCPS fails with ClosedByInterruptException - intermittent.
2 participants