Skip to content

Commit

Permalink
Retry failed Admin commands
Browse files Browse the repository at this point in the history
Admin commands can fail if the node hasn't updated its metadata.
E.g. it does not know yet about the latest logs configuration which
it needs for appending the terminate command.
  • Loading branch information
tillrohrmann committed Nov 14, 2024
1 parent a5a644f commit 973ad40
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class CancelInvocation {

// The termination signal might arrive before the blocking call to the cancel singleton was
// made, so we need to retry.
await.ignoreException(TimeoutCancellationException::class.java) withAlias
await withAlias
"verify test" untilAsserted
{
client.terminateInvocation(id, TerminationMode.CANCEL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ class KillInvocation {

// Kill the invocation
val client = InvocationApi(ApiClient().setHost(metaURL.host).setPort(metaURL.port))
client.terminateInvocation(id, TerminationMode.KILL)

// The termination signal might arrive before the blocking call to the cancel singleton was
// made, so we need to retry.
await withAlias
"verify test" untilAsserted
{
client.terminateInvocation(id, TerminationMode.KILL)
}

await withAlias
"singleton service is unlocked after killing the call tree" untilAsserted
Expand Down

0 comments on commit 973ad40

Please sign in to comment.