mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
closes #5661, fix drd issue
git-svn-id: file:///svn/toku/tokudb@49538 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
9659dc651c
commit
e5faea7b5c
1 changed files with 8 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue