mirror of
https://github.com/Zygo/bees.git
synced 2025-08-03 14:23:29 +02:00
Compare commits
1 Commits
extra-trac
...
v0.6.4
Author | SHA1 | Date | |
---|---|---|---|
|
21ae937201 |
@@ -219,7 +219,6 @@ 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()) {
|
||||||
@@ -416,15 +415,13 @@ BeesRoots::crawl_thread()
|
|||||||
BEESNOTE("tracking transid");
|
BEESNOTE("tracking transid");
|
||||||
auto last_count = m_transid_re.count();
|
auto last_count = m_transid_re.count();
|
||||||
while (true) {
|
while (true) {
|
||||||
BEESTRACE("Measure current transid");
|
// 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());
|
||||||
});
|
});
|
||||||
|
|
||||||
BEESTRACE("Make sure we have a full complement of crawlers");
|
// Make sure we have a full complement of crawlers
|
||||||
catch_all([&]() {
|
catch_all([&]() {
|
||||||
BEESTRACE("calling insert_new_crawl");
|
|
||||||
insert_new_crawl();
|
insert_new_crawl();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -492,24 +489,19 @@ 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user