SandeshStateMachine::WorkQueue task acquires cdbq_mutex_ [CdbIf::Db_AddColumn()] and then WorkQueue::mutex_[WorkQueue<CdbIf::CdbIfColList>::MayBeStartRunner()] when sandesh
is received from the generator. At the same time, CdbIf::WorkQueue task acquires WorkQueue::mutex_ [WorkQueue<CdbIf::CdbIfColList>::RunnerDone()] and then
cdbq_mutex_ [CdbIf::Db_Uninit()] when connection to the Analytics database is disconnected and TTransportException is raised in CdbIf::Db_BatchAddColumn().
This results in deadlock as the locks are acquired in the reverse direction in different tasks that run in parallel.
Added a new function Db_UninitUnlocked() that would be invoked from SandeshGenerator::StartDbifReinit().
Closes-Bug: #1348563

Change-Id: I0d9601c24bb19645bea75e244ae662e0bdc407ce
(cherry picked from commit cc9327482367c12dd4122bcc6aebee8f67561f08)
Merge "SandeshStateMachine::WorkQueue task acquires cdbq_mutex_ [CdbIf::Db_AddColumn()] and then WorkQueue::mutex_[WorkQueue<CdbIf::CdbIfColList>::MayBeStartRunner()] when sandesh is received from the generator. At the same time, CdbIf::WorkQueue task acquires WorkQueue::mutex_ [WorkQueue<CdbIf::CdbIfColList>::RunnerDone()] and then cdbq_mutex_ [CdbIf::Db_Uninit()] when connection to the Analytics database is disconnected and TTransportException is raised in CdbIf::Db_BatchAddColumn(). This results in deadlock as the locks are acquired in the reverse direction in different tasks that run in parallel. Added a new function Db_UninitUnlocked() that would be invoked from SandeshGenerator::StartDbifReinit(). Closes-Bug: #1348563" into R1.10