@@ -90,6 +90,10 @@ AntiCacheEvictionManager::AntiCacheEvictionManager(const VoltDBEngine *engine) {
9090 m_migrate = false ;
9191
9292
93+ if (pthread_mutex_init (&lock, NULL ) != 0 ) {
94+ VOLT_ERROR (" Mutex init failed!" );
95+ }
96+
9397 if (pthread_mutex_init (&(prio_lock.cv_mutex ), NULL ) != 0 ) {
9498 VOLT_ERROR (" Mutex init failed!" );
9599 }
@@ -112,6 +116,8 @@ AntiCacheEvictionManager::~AntiCacheEvictionManager() {
112116 delete m_evicted_tuple;
113117 TupleSchema::freeTupleSchema (m_evicted_schema);
114118
119+ pthread_mutex_destroy (&lock);
120+
115121 pthread_mutex_destroy (&prio_lock.cv_mutex );
116122 pthread_mutex_destroy (&prio_lock.cs_mutex );
117123 pthread_cond_destroy (&prio_lock.cond );
@@ -1364,6 +1370,7 @@ bool AntiCacheEvictionManager::readEvictedBlock(PersistentTable *table, int32_t
13641370 VOLT_DEBUG (" num tuples is %d" , tuples);
13651371 }
13661372
1373+ // pthread_mutex_lock(&lock);
13671374 table->insertUnevictedBlock (unevicted_tuples, table->m_read_pivot );
13681375 table->insertTupleOffset (tuple_offset, table->m_read_pivot );
13691376 table->insertBlockID (block_id, table->m_read_pivot );
@@ -1373,6 +1380,7 @@ bool AntiCacheEvictionManager::readEvictedBlock(PersistentTable *table, int32_t
13731380 }
13741381 else
13751382 table->m_read_pivot ++;
1383+ // pthread_mutex_unlock(&lock);
13761384
13771385 // if (table->m_read_pivot % 10000 == 0)
13781386
0 commit comments