Skip to content

External token ack hang#10930

Closed
s2lomon wants to merge 2 commits intotrinodb:masterfrom
s2lomon:external-token-ack-hang
Closed

External token ack hang#10930
s2lomon wants to merge 2 commits intotrinodb:masterfrom
s2lomon:external-token-ack-hang

Conversation

@s2lomon
Copy link
Copy Markdown
Member

@s2lomon s2lomon commented Feb 3, 2022

It's a bug in a client, as it's too restrictive expecting for the server to return 200 OK Http Code to be returned on ack token, when in reality the endpoint returns 204 NO_CONTENT. This causes token mechanism to hang for 4s before it finishes.
Fix tries to handle this from both sides:

  • it improves client code to react only on server and connectivity errors
  • it makes the /oauth2/token/{authId} DELETE response to return 200 with body, to meet the expectations of older and different clients

.withMaxDuration(Duration.ofSeconds(4))
.withBackoff(100, 500, MILLIS)
.handleResultIf(code -> code != HTTP_OK))
.handleResultIf(code -> code >= 500))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about 4xx or 3xx?

@s2lomon s2lomon closed this Feb 3, 2022
@s2lomon
Copy link
Copy Markdown
Member Author

s2lomon commented Feb 3, 2022

duplication of #10929

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants