1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-859 DDL System catalog mutex deadlock

A race between a DDL change and a system catalog version cache update
can cause a deadlock in DDLProc. This makes the mutex recursive.
This commit is contained in:
Andrew Hutchings
2017-09-15 10:05:19 +01:00
committed by David Hall
parent 54cc870b82
commit 8ca85fbb40
2 changed files with 4 additions and 3 deletions

View File

@ -1190,7 +1190,7 @@ const CalpontSystemCatalog::ColType CalpontSystemCatalog::colTypeDct(const OID&
}
// check map first cached column type
boost::mutex::scoped_lock lk3(fDctTokenMapLock);
boost::recursive_mutex::scoped_lock lk3(fDctTokenMapLock);
DctTokenMap::const_iterator iter = fDctTokenMap.find(dictOid);
if (iter != fDctTokenMap.end())
return colType(iter->second);
@ -5320,7 +5320,7 @@ void CalpontSystemCatalog::flushCache()
buildSysTablemap();
lk3.unlock();
boost::mutex::scoped_lock lk4(fDctTokenMapLock);
boost::recursive_mutex::scoped_lock lk4(fDctTokenMapLock);
fDctTokenMap.clear();
buildSysDctmap();
lk4.unlock();