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

Merge host info from kvstore and memory #532

Closed
critical27 opened this issue Jun 19, 2019 · 5 comments
Closed

Merge host info from kvstore and memory #532

critical27 opened this issue Jun 19, 2019 · 5 comments
Assignees

Comments

@critical27
Copy link
Contributor

For now, ActiveHostsMan will load host info from kvstore when it start-up, so it have to wait until kvstore is ready. We can load host info in background thread and merge result from kvstore and memory to update the online/offline status. In that way, we can get rid of sleep when initializing kvstore.

@dangleptr
Copy link
Contributor

Very good.

1 similar comment
@ghost
Copy link

ghost commented Jun 19, 2019

Very good.

This was referenced Jun 25, 2019
@sherman-the-tank
Copy link
Member

Why do we persist the active host info in kvstore? If this is the cache of the meta information we discussed earlier, we need to store other information as well.

Please shed more light, or we can talk about this offline

@critical27
Copy link
Contributor Author

critical27 commented Jul 2, 2019

@sherman-the-tank
As #440, we add some host status of online/offline. So we persist the host status in kvstore. And in #450, I load host info from kvstore when ActiveHostsMan start-up, which makes we have to wait until kvstore is ready, that is purpose of this issue.

@critical27
Copy link
Contributor Author

In #550, @andychow01 fix this by loading info from kvstore lazily, when kvstore is ready, we can merge info from kvstore and memory. The reason of merging is that the host status in kvstore may be outdated because of leadership change.

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

No branches or pull requests

3 participants