-
Notifications
You must be signed in to change notification settings - Fork 537
HDDS-11513. All deletion configurations should be configurable without restart #8003
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sarvekshayr for the patch.
Making properties reconfigurable is a good first step, but the services do not pick up the updated configurations. dirDeletingServiceInterval
etc. are only used by the tests.
private String blockDeletingServiceInterval; | ||
private String blockDeletingServiceTimeout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should not store the raw String config.
@adoroszlai, the dirDeletingServiceInterval(ozone.directory.deleting.service.interval) and blockDeletingServiceInterval(ozone.block.deleting.service.interval) are used by the background services to determine the intervals between their execution. These intervals, apart from being used in tests, are configured for the background services that delete directories and blocks. The background service uses scheduleWithFixedDelay to schedule the tasks with the specified intervals. |
Lines 245 to 260 in 10945c8
They are stored in the base ozone/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/BackgroundService.java Lines 58 to 65 in 10945c8
which schedules the task when started: ozone/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/BackgroundService.java Lines 108 to 109 in 10945c8
Reconfiguring does not change values in |
Thanks for the clarification, @adoroszlai. I checked the code, for these configs to be updated, we need to restart the OM. The "ozone om" command starts the key manager, which then initializes the block deleting and directory deleting service with their intervals. So, simply updating these properties without starting the OM again won't be effective here. |
That's my point. OM can be tweaked to pick up the config without restart, but the current patch is not enough for that yet. |
What changes were proposed in this pull request?
The following deletion related configurations are now dynamically reconfigurable without requiring a restart.
This allows for easy tuning of deletion in response to logs and metrics.
OM:
DATANODE:
What is the link to the Apache JIRA
HDDS-11513
How was this patch tested?
OM:
ozone.directory.deleting.service.interval
successfullyozone.thread.number.dir.deletion
successfullyozone.thread.number.dir.deletion
value is negative.DATANODE:
ozone.block.deleting.service.interval
andozone.block.deleting.service.timeout
successfully