Skip to content
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

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

Vigor-jpg
Copy link

Issue Number: opencurve/curve#2261
Curve PR: opencurve/curve#2775

@Vigor-jpg Vigor-jpg force-pushed the format branch 2 times, most recently from 6526177 to 4a7ad5b Compare October 3, 2023 13:51
@caoxianfei1
Copy link
Contributor

Will this be compatible with all versions? If not, you need to do some processing

@Vigor-jpg Vigor-jpg force-pushed the format branch 2 times, most recently from 4bf36b6 to 4076c41 Compare October 23, 2023 10:57
@Vigor-jpg
Copy link
Author

Will this be compatible with all versions? If not, you need to do some processing

Yes, I have made some change to make it compatible with previous version.

@Vigor-jpg
Copy link
Author

Vigor-jpg commented Oct 23, 2023

image

How to config is shown in the figure above.

Comment on lines 76 to 80
func (dc *DeployConfig) exist(i *item) bool {
_, ok := dc.config[i.key]
return ok
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary.

Comment on lines 177 to 184
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)
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary.

Comment on lines 142 to 147
if dc.ExistChunkFilePoolAllocatedPercent() {
chunkserverArguments["chunkFilePoolAllocatedPercent"] = dc.GetChunkFilePoolAllocatedPercent()
}
if dc.ExistChunkFormatThreadNum() {
chunkserverArguments["chunkFormatThreadNum"] = dc.GetChunkFormatThreadNum()
}
Copy link
Contributor

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.

Copy link
Author

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.

@Vigor-jpg Vigor-jpg changed the base branch from develop to developer-activity October 27, 2023 11:18
@caoxianfei1
Copy link
Contributor

LGTM!

@caoxianfei1 caoxianfei1 merged commit 96d366f into opencurve:developer-activity Oct 28, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants