Skip to content

[Feature][Java] Added retries to remote calls in MCP server#531

Open
yanand0909 wants to merge 5 commits intoapache:mainfrom
yanand0909:add_retries
Open

[Feature][Java] Added retries to remote calls in MCP server#531
yanand0909 wants to merge 5 commits intoapache:mainfrom
yanand0909:add_retries

Conversation

@yanand0909
Copy link
Collaborator

Linked issue: 521

Purpose of change

Add user configurable retries for MCPServer remote calls

Tests

Added retry test and existing UT and IT

API

Yes

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

@github-actions github-actions bot added priority/major Default priority of the PR or issue. fixVersion/0.2.0 The feature or bug should be implemented/fixed in the 0.2.0 version. doc-needed Your PR changes impact docs. labels Feb 10, 2026
@yanand0909
Copy link
Collaborator Author

Hey @xintongsong, can you take a look at this PR. Thanks

@weiqingy
Copy link
Collaborator

PR title has typo: "retires" should be "retries".

@xintongsong xintongsong changed the title [Feature][Java] Added retires to remote calls in MCP server [Feature][Java] Added retries to remote calls in MCP server Feb 24, 2026
Copy link
Contributor

@xintongsong xintongsong left a comment

Choose a reason for hiding this comment

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

@yanand0909, thanks for working on this. I've left a few comments. PTAL

Copy link
Contributor

@xintongsong xintongsong left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comment. Looks good to me in general. Just one minor question.

Comment on lines 90 to 92
private static final int MAX_RETRIES_VALUE = 3;
private static final int INITIAL_BACKOFF_MS_VALUE = 100;
private static final int MAX_BACKOFF_MS_VALUE = 10000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need these default values? They are already included in RetryExecutor.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes actually it is redundant in MCPServer now, thanks for pointing out @xintongsong

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

Labels

doc-needed Your PR changes impact docs. fixVersion/0.2.0 The feature or bug should be implemented/fixed in the 0.2.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants