mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
refs #5380 don't assert_locked during call to writers(), we may call this when we assume we own the write lock, and therefore don't need the mutex
git-svn-id: file:///svn/toku/tokudb@47043 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
c75dae7ccd
commit
f8baef6ceb
2 changed files with 4 additions and 2 deletions
|
@ -2613,10 +2613,10 @@ int toku_cachetable_unpin_and_remove (
|
|||
CACHETABLE ct = cachefile->cachetable;
|
||||
|
||||
p->dirty = CACHETABLE_CLEAN; // clear the dirty bit. We're just supposed to remove it.
|
||||
assert(p->value_rwlock.writers());
|
||||
// grab disk_nb_mutex to ensure any background thread writing
|
||||
// out a cloned value completes
|
||||
pair_lock(p);
|
||||
assert(p->value_rwlock.writers());
|
||||
nb_mutex_lock(&p->disk_nb_mutex, &p->mutex);
|
||||
pair_unlock(p);
|
||||
assert(p->cloned_value_data == NULL);
|
||||
|
|
|
@ -225,7 +225,9 @@ inline uint32_t frwlock::blocked_users(void) const {
|
|||
return m_num_want_read + m_num_want_write;
|
||||
}
|
||||
inline uint32_t frwlock::writers(void) const {
|
||||
toku_mutex_assert_locked(m_mutex);
|
||||
// this is sometimes called as "assert(lock->writers())" when we
|
||||
// assume we have the write lock. if that's the assumption, we may
|
||||
// not own the mutex, so we don't assert_locked here
|
||||
return m_num_writers;
|
||||
}
|
||||
inline uint32_t frwlock::blocked_writers(void) const {
|
||||
|
|
Loading…
Add table
Reference in a new issue