forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix recursive memory arbitration caused by parallel spill
Summary: We do parallel spill at plan node level which reclaim memory from background threads which might trigger memory allocation like file writer stripe flush. The memory allocation might trigger memory arbitration again if the background thread doesn't carry the memory arbitration context. The recursive memory arbitration might deadlock the new memory arbitration requests, and eventually all the driver threads on a worker. We currently have createAsyncMemoryReclaimTask which carries on the memory arbitration context but it doesn't cover all the cases (this is due to a recent regression which breaks the dependency from memory module on velox common base as async source is defined in common base). The fix is to use createAsyncMemoryReclaimTask to trigger parallel spill. The follow is to have a generic execution context framework and the async source automatically pickups the current set execution context. Also with global arbitration optimization, we won't block driver thread execution from different threads. It also has e2e memory arbitration request timeout mechanism to prevent this. Reviewed By: kevinwilfong, oerling Differential Revision: D62512713
- Loading branch information
1 parent
485329e
commit 0079d4a
Showing
8 changed files
with
139 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters