-
Notifications
You must be signed in to change notification settings - Fork 436
issue=#1202 ts unload all tablets on exit #1203
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
Conversation
Counter worker_count; | ||
worker_count.Set(tablet_ios.size()); | ||
|
||
for (uint32_t i = 0; i < tablet_ios.size(); ++i) { |
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.
这里单机的unload没有并发控制,是计划在分布式操作系统这个层次控制每秒kill的tabletserver数量?
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.
嗯,一批一批重启
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.
掉tabletnode_imple的unload接口,比调用tabletio的unload接口,更合理否(内部会从tablet_manager中删除tablet)
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.
从tablet-manager中删掉会造成not in range错误,meta表压力变高;
直接调用UnloadTablet接口需要再find一次tablet-io
LGTM |
delete tablet_meta; | ||
std::vector<common::Thread> unload_threads; | ||
unload_threads.resize(tablet_ios.size()); | ||
|
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.
会不会爆
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.
不会,跟tablet-writer线程的数量一样
} | ||
tablet_io->DecRef(); | ||
worker_count->Dec(); | ||
} |
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.
tablet_io在另外一个线程解引用,感觉不好理解
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.
引用计数这么用很自然的感觉呀?
kill -9: <1s (keep all log)
load: 75s (recover all log)
...........................................................................................................................
kill: 15s (dump memtable and clean all log)
load: <1s (only read CURRENT and menifest)