-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add startup parameters for chunkserver #314
Conversation
6526177
to
4a7ad5b
Compare
Will this be compatible with all versions? If not, you need to do some processing |
4bf36b6
to
4076c41
Compare
Yes, I have made some change to make it compatible with previous version. |
func (dc *DeployConfig) exist(i *item) bool { | ||
_, ok := dc.config[i.key] | ||
return ok | ||
} | ||
|
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.
unnecessary.
func (dc *DeployConfig) ExistChunkFilePoolAllocatedPercent() bool { | ||
return dc.exist(CONFIG_CHUNK_FILE_POOL_ALLOCATED_PERCENT) | ||
} | ||
|
||
func (dc *DeployConfig) ExistChunkFormatThreadNum() bool { | ||
return dc.exist(CONFIG_CHUNK_FORMAT_THREAD_NUM) | ||
} | ||
|
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.
unnecessary.
if dc.ExistChunkFilePoolAllocatedPercent() { | ||
chunkserverArguments["chunkFilePoolAllocatedPercent"] = dc.GetChunkFilePoolAllocatedPercent() | ||
} | ||
if dc.ExistChunkFormatThreadNum() { | ||
chunkserverArguments["chunkFormatThreadNum"] = dc.GetChunkFormatThreadNum() | ||
} |
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.
Delete the function that determines whether it exists and use nil value for judgment.
May be we can use it:
if dc.GetChunkFilePoolAllocatedPercent() != 0 {
}
if dc.GetChunkFormatThreadNum() != 0 {
}
please push to the developer-activity branch.
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.
I think we can't judge whether it's empty by whether the return is 0 or not.
Signed-off-by: yyyyufeng <[email protected]>
LGTM! |
Issue Number: opencurve/curve#2261
Curve PR: opencurve/curve#2775