config: reload config by SIGUSR2#11589
Merged
Totktonada merged 1 commit intotarantool:masterfrom Jun 26, 2025
Merged
Conversation
AArdeev
approved these changes
Jun 19, 2025
49f62d8 to
7c8ae8c
Compare
locker
approved these changes
Jun 19, 2025
georgiy-belyanin
approved these changes
Jun 19, 2025
The idea is quite straightforward: once tarantool receives `SIGUSR2`, it reloads the YAML configuration. If the YAML configuration is not provided (the instance is started using the 2.x Lua script flow), it is no-op. Consequent signals may be coalesced by the OS if they're sent fast enough. However, if tarantool is in processing of one reload triggered by a signal, the next signal is queued and a second reload happens after the first one. The current implementation has a nuance: `config:reload()` called from Lua is not queued. If `SIGUSR2` arrives during `config:reload()`, a log warning issued and the second reload doesn't happen. Similarly, automatic reload from a remote configuration source (etcd/config storage) is not queued. These nuances are *not* an API guarantee and I hope that we'll process various kinds of reload requests in some uniform way in a future. Fixes tarantool#11585 @TarantoolBot document Title: config: reload configuration by SIGUSR2 Now, tarantool reloads the YAML configuration if the `SIGUSR2` signal arrives.
7c8ae8c to
879e33f
Compare
Contributor
Author
|
Rebased on top of a fresh master. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The idea is quite straightforward: once tarantool receives
SIGUSR2, it reloads the YAML configuration. If the YAML configuration is not provided (the instance is started using the 2.x Lua script flow), it is no-op.Consequent signals may be coalesced by the OS if they're sent fast enough. However, if tarantool is in processing of one reload triggered by a signal, the next signal is queued and a second reload happens after the first one.
The current implementation has a nuance:
config:reload()called from Lua is not queued. IfSIGUSR2arrives duringconfig:reload(), a log warning issued and the second reload doesn't happen. Similarly, automatic reload from a remote configuration source (etcd/config storage) is not queued.These nuances are not an API guarantee and I hope that we'll process various kinds of reload requests in some uniform way in a future.
Fixes #11585