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 region approximate size #2132

Merged
merged 1 commit into from
Aug 9, 2017
Merged

Conversation

huachaohuang
Copy link
Contributor

Get approximate region size from user properties.

@huachaohuang
Copy link
Contributor Author

PTAL @siddontang @zhangjinpeng1987

@siddontang
Copy link
Contributor

LGTM

@@ -1435,6 +1435,10 @@ impl Peer {
None
}

pub fn approximate_size(&self) -> Result<u64> {
Copy link
Member

Choose a reason for hiding this comment

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

Don't add the calculation into raftstore thread, it might block raftstore thread.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is ok now, we will do it in another thread later

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is ok now, we will do it in another thread later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean I should put it in the worker instead of heartbeat_pd?

@zhangjinpeng87
Copy link
Member

LGTM

@huachaohuang huachaohuang force-pushed the huachao/approximate-size branch from e383ec9 to 2b40e97 Compare August 8, 2017 14:34
Copy link
Member

@zhangjinpeng87 zhangjinpeng87 left a comment

Choose a reason for hiding this comment

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

LGTM

@huachaohuang huachaohuang merged commit 13a8b89 into master Aug 9, 2017
@huachaohuang huachaohuang deleted the huachao/approximate-size branch August 9, 2017 02:43
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.

3 participants