Commit 9189e5b4 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 6ad94562
......@@ -2967,12 +2967,15 @@ int cleaner::run_cleaner(void) {
if (best_pair && m_pl->m_cleaner_head->mutex == best_pair->mutex) {
// Advance the cleaner head.
long score = 0;
score = cleaner_thread_rate_pair(m_pl->m_cleaner_head);
if (score > best_score) {
best_score = score;
best_pair = m_pl->m_cleaner_head;
// only bother with this pair if it has no current users
if (m_pl->m_cleaner_head->value_rwlock.users() > 0) {
score = cleaner_thread_rate_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;
}
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