Commit e5faea7b authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

closes #5661, fix drd issue

git-svn-id: file:///svn/toku/tokudb@49538 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9659dc65
...@@ -2967,12 +2967,15 @@ int cleaner::run_cleaner(void) { ...@@ -2967,12 +2967,15 @@ int cleaner::run_cleaner(void) {
if (best_pair && m_pl->m_cleaner_head->mutex == best_pair->mutex) { if (best_pair && m_pl->m_cleaner_head->mutex == best_pair->mutex) {
// Advance the cleaner head. // Advance the cleaner head.
long score = 0; long score = 0;
score = cleaner_thread_rate_pair(m_pl->m_cleaner_head); // only bother with this pair if it has no current users
if (score > best_score) { if (m_pl->m_cleaner_head->value_rwlock.users() > 0) {
best_score = score; score = cleaner_thread_rate_pair(m_pl->m_cleaner_head);
best_pair = m_pl->m_cleaner_head; if (score > best_score) {
best_score = score;
best_pair = m_pl->m_cleaner_head;
}
m_pl->m_cleaner_head = m_pl->m_cleaner_head->clock_next;
} }
m_pl->m_cleaner_head = m_pl->m_cleaner_head->clock_next;
continue; continue;
} }
pair_lock(m_pl->m_cleaner_head); pair_lock(m_pl->m_cleaner_head);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment