-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-17285. RBF: Add a safe mode check period configuration #6347
Conversation
…r safe mode check period.
🎊 +1 overall
This message was automatically generated. |
@@ -279,6 +279,10 @@ public class RBFConfigKeys extends CommonConfigurationKeysPublic { | |||
FEDERATION_ROUTER_PREFIX + "safemode.expiration"; | |||
public static final long DFS_ROUTER_SAFEMODE_EXPIRATION_DEFAULT = | |||
3 * DFS_ROUTER_CACHE_TIME_TO_LIVE_MS_DEFAULT; | |||
public static final String DFS_ROUTER_SAFEMODE_CHECKPERIOD = |
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.
We are indirectly reducing the safe mode period but what we are really doing is adding a separate argument for this.
I agree that this should happen.
Let's just change the JIRA and PR title to "RBF: Add a safe mode check period configuration".
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.
Sure. Thank you
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.
Should we write the unit after the variable? DFS_ROUTER_SAFEMODE_CHECKPERIOD_S?
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 for review. Test case is in testRouterExitSafemode.
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.
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.
@slfan1989 Thanks for your advise. Add MS for variable.
Passing by, what is blocking here? If nothing anyone hitting the merge button? |
@ayushtkn Thanks for helping with the review! I will merge this pr to the trunk branch. |
🎊 +1 overall
This message was automatically generated. |
JIRA: HDFS-17285. RBF: Add a safe mode check period configuration.
When dfsrouter start, it enters safe mode. And it will cost 1min to leave.
The log is blow:
It depends on these configs.
DFS_ROUTER_SAFEMODE_EXTENSION 30s
DFS_ROUTER_SAFEMODE_EXPIRATION 3min
DFS_ROUTER_CACHE_TIME_TO_LIVE_MS 1min (it is the period for check safe mode)
Because in safe mode dfsrouter will reject write requests, so it should be shorter in check period if refreshCaches is done. And we should remove DFS_ROUTER_CACHE_TIME_TO_LIVE_MS from RouterSafemodeService.