mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
roots: add a TRACE for transid_max search and crawl_transid thread
Some users are hitting an exception somewhere in crawl_transid, which forces bees to return back to the transid_max calculation over and over. Also out-of-range transids. Add some BEESTRACE so we can see what we were doing in the exception handler. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
7008c74113
commit
b2d4a07c6f
@ -202,6 +202,7 @@ BeesRoots::transid_max_nocache()
|
|||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
sk.nr_items = 1024;
|
sk.nr_items = 1024;
|
||||||
|
BEESTRACE("transid_max search sk " << sk);
|
||||||
sk.do_ioctl(m_ctx->root_fd());
|
sk.do_ioctl(m_ctx->root_fd());
|
||||||
|
|
||||||
if (sk.m_result.empty()) {
|
if (sk.m_result.empty()) {
|
||||||
@ -390,13 +391,15 @@ BeesRoots::crawl_thread()
|
|||||||
BEESNOTE("tracking transid");
|
BEESNOTE("tracking transid");
|
||||||
auto last_count = m_transid_re.count();
|
auto last_count = m_transid_re.count();
|
||||||
while (!m_stop_requested) {
|
while (!m_stop_requested) {
|
||||||
// Measure current transid
|
BEESTRACE("Measure current transid");
|
||||||
catch_all([&]() {
|
catch_all([&]() {
|
||||||
|
BEESTRACE("calling transid_max_nocache");
|
||||||
m_transid_re.update(transid_max_nocache());
|
m_transid_re.update(transid_max_nocache());
|
||||||
});
|
});
|
||||||
|
|
||||||
// Make sure we have a full complement of crawlers
|
BEESTRACE("Make sure we have a full complement of crawlers");
|
||||||
catch_all([&]() {
|
catch_all([&]() {
|
||||||
|
BEESTRACE("calling insert_new_crawl");
|
||||||
insert_new_crawl();
|
insert_new_crawl();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -478,19 +481,24 @@ BeesRoots::insert_new_crawl()
|
|||||||
unique_lock<mutex> lock(m_mutex);
|
unique_lock<mutex> lock(m_mutex);
|
||||||
set<uint64_t> excess_roots;
|
set<uint64_t> excess_roots;
|
||||||
for (auto i : m_root_crawl_map) {
|
for (auto i : m_root_crawl_map) {
|
||||||
|
BEESTRACE("excess_roots.insert(" << i.first << ")");
|
||||||
excess_roots.insert(i.first);
|
excess_roots.insert(i.first);
|
||||||
}
|
}
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
||||||
while (new_bcs.m_root) {
|
while (new_bcs.m_root) {
|
||||||
|
BEESTRACE("excess_roots.erase(" << new_bcs.m_root << ")");
|
||||||
excess_roots.erase(new_bcs.m_root);
|
excess_roots.erase(new_bcs.m_root);
|
||||||
|
BEESTRACE("insert_root(" << new_bcs << ")");
|
||||||
insert_root(new_bcs);
|
insert_root(new_bcs);
|
||||||
BEESCOUNT(crawl_create);
|
BEESCOUNT(crawl_create);
|
||||||
|
BEESTRACE("next_root(" << new_bcs.m_root << ")");
|
||||||
new_bcs.m_root = next_root(new_bcs.m_root);
|
new_bcs.m_root = next_root(new_bcs.m_root);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto i : excess_roots) {
|
for (auto i : excess_roots) {
|
||||||
new_bcs.m_root = i;
|
new_bcs.m_root = i;
|
||||||
|
BEESTRACE("crawl_state_erase(" << new_bcs << ")");
|
||||||
crawl_state_erase(new_bcs);
|
crawl_state_erase(new_bcs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user