Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the lock order issue caused by value operator init (facebookincub…
…ator#9738) Summary: The lock order issue detected by tsan is as follows: T1: task startup creates driver and constructor operators which holds the task lock T2: value operator constructor allocates memory from memory pool for parallelized value node mode which triggers memory arbitration T3: the memory arbitration grabs arbitration lock for arbitration T4: the memory reclaim tries to grabs the task lock for reclaim such as to pause the task execution This forms a deadlock and we have the logic to detect the memory pool allocation from the operator constructor in driver execution framework. However the memory pool of vectors used by value nodes is not the query memory pool but owns by the test framework. This PR moves the memory pool allocation from constructor to initialize() method as the other operator does. Pull Request resolved: facebookincubator#9738 Test Plan: The test passed 100 stress test iterations: https://www.internalfb.com/intern/testinfra/testrun/10414574171435627 https://www.internalfb.com/intern/testinfra/testrun/13229323938244819 Reviewed By: bikramSingh91 Differential Revision: D57063553 Pulled By: xiaoxmeng fbshipit-source-id: 3ad661c35bfa46693729e60420f22920f83a7ff0
- Loading branch information