8000 issue=#1202 ts unload all tablets on exit by 00k · Pull Request #1203 · baidu/tera · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 1 commit into from
Mar 3, 2017

Conversation

00k
Copy link
Collaborator
@00k 00k commented Mar 1, 2017

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)

@baidubot
Copy link
Collaborator
baidubot commented Mar 1, 2017

Reviewers: @caijieming-baidu @yvxiang @lylei

@00k 00k force-pushed the unload-on-exit branch from f068bc4 to 866d99e Compare March 1, 2017 06:24
Counter worker_count;
worker_count.Set(tablet_ios.size());

for (uint32_t i = 0; i < tablet_ios.size(); ++i) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里单机的unload没有并发控制,是计划在分布式操作系统这个层次控制每秒kill的tabletserver数量?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

嗯,一批一批重启

Copy link
Collaborator

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)

Copy link
Collaborator Author

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

@taocp
Copy link
Collaborator
taocp commented Mar 2, 2017

LGTM

delete tablet_meta;
std::vector<common::Thread> unload_threads;
unload_threads.resize(tablet_ios.size());

Copy link
Collaborator

Choose a reason for hiding this comment

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

会不会爆

Copy link
Collaborator Author

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();
}
Copy link
Collaborator
@caijieming-ng caijieming-ng Mar 3, 2017

Choose a reason for hiding this comment

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

tablet_io在另外一个线程解引用,感觉不好理解

Copy link
Collaborator

Choose a reason for hiding this comment

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

引用计数这么用很自然的感觉呀?

@caijieming-ng caijieming-ng merged commit 7f66e9e into baidu:master Mar 3, 2017
@00k
Copy link
Collaborator Author
00k commented Apr 11, 2017

#1202

00k added a commit that referenced this pull request Apr 16, 2017
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.

4 participants
0