Skip to content

Conversation

@yx9o
Copy link
Contributor

@yx9o yx9o commented Dec 1, 2025

Replace kafka.log.stream.s3.network.ControllerRequestSender#MAX_RETRY_DELAY_MS with a value that can be set via environment variables.

Copilot AI review requested due to automatic review settings December 1, 2025 14:57
Copilot finished reviewing on behalf of yx9o December 1, 2025 15:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances configuration flexibility by replacing the hard-coded MAX_RETRY_DELAY_MS constant with an environment variable-based configuration. The change allows operators to customize the maximum retry delay for controller requests without modifying code.

Key Changes:

  • Replaced fixed 10-second max retry delay with AUTOMQ_MAX_RETRY_DELAY_MS environment variable
  • Added import for com.automq.stream.utils.Systems utility class
  • Maintained backward compatibility with 10-second default value

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copilot AI review requested due to automatic review settings December 2, 2025 01:52
Copilot finished reviewing on behalf of yx9o December 2, 2025 01:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

superhx
superhx previously approved these changes Dec 2, 2025
private static final Logger LOGGER = LoggerFactory.getLogger(ControllerRequestSender.class);

private static final long MAX_RETRY_DELAY_MS = 10 * 1000; // 10s
private static final long MAX_RETRY_DELAY_MS = Systems.getEnvLong("AUTOMQ_MAX_RETRY_DELAY_MS", 10L * 1000); // 10s
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe the env name could be more specific such as AUTOMQ_CONTROLLER_REQUEST_MAX_RETRY_DELAY_MS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has been adjusted. Please review it again. Thank you.

@superhx superhx merged commit e05e3a4 into AutoMQ:main Dec 3, 2025
6 checks passed
superhx added a commit that referenced this pull request Dec 3, 2025
@yx9o yx9o deleted the dev-1201 branch December 3, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants