Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[draft] add limitations for restart and wait between restarts #50

Conversation

shmel1k
Copy link
Member

@shmel1k shmel1k commented Dec 13, 2024

Options and description

max-concurrent-restarts -- The limit on the number of simultaneous restarts
delay-between-restarts-seconds -- Delay between two consecutive restarts in seconds. The number of simultaneous is set by 'max-concurrent-restarts'

@shmel1k shmel1k force-pushed the feature/add_possibility_to_limit_restarts_concurrency branch from 0682fa3 to bbe39d5 Compare December 13, 2024 08:52
@shmel1k shmel1k force-pushed the feature/add_possibility_to_limit_restarts_concurrency branch from bbe39d5 to 483d904 Compare December 14, 2024 11:31
@shmel1k shmel1k force-pushed the feature/add_possibility_to_limit_restarts_concurrency branch from 17a9cbc to 6d8b006 Compare December 14, 2024 19:11
}

func (rh *restartHandler) stop() {
rh.onceDone.Do(func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not convinced it is necessary. What are you protecting against? The channel should be closed only once in your code - if you somehow call stop twice, it is your problem and signifies some deeper issue with the code. I currently think we MUST NOT cover closing this channel with a sync.once.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

@shmel1k shmel1k force-pushed the feature/add_possibility_to_limit_restarts_concurrency branch from 5278602 to fd38330 Compare December 15, 2024 14:39
@shmel1k shmel1k merged commit 8d91beb into ydb-platform:master Dec 17, 2024
2 checks passed
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.

4 participants