-
Notifications
You must be signed in to change notification settings - Fork 555
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
remove magic number #900
remove magic number #900
Conversation
|
有些问题: |
@lpstudy |
@@ -335,7 +336,8 @@ double ChunkServerManager::GetChunkServerLoad(ChunkServerInfo* cs) { | |||
double data_score = cs->data_size() * 1.0 / cs->disk_quota(); | |||
int64_t space_left = cs->disk_quota() - cs->data_size(); | |||
|
|||
if (data_score > 0.95 || space_left < (5L << 30) || pending_score > 1.0) { | |||
if (data_score > 0.95 || pending_score > 1.0 | |||
|| space_left < (FLAGS_chunkserver_disk_safe_space << 20)) { |
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.
flags.cc
里chunkserver_disk_safe_space
的默认值为5120
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.
恩恩,我看到了。 flags.cc中确实标记了单位。 不过一眼看到两个单词有错误,哈哈
(line 82, 83 in flags.cc).
- the disk will be
concidered
full. considered - Used to computer disk
wordload
: workload
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.
估计手抖了,请提个pr改了吧:)
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.
还有如果既然修改了这个,那么data_score > 0.95中的0.95
这样的字样似乎也应该修改为FLAG标记。
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.
嗯,可以改成FLAG
#899