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.
Consolidate Operator's close and abort APIs (facebookincubator#8757)
Summary: The close() and abort() APIs share the same objective: to release resources held by the operator. However, they are not currently implemented uniformly across all operators. For example, HashBuild and HashProbe have abort() implemented, but not close(). This discrepancy can lead to inconsistencies in the expected effects of these API calls, particularly in the context of their usage. For instance, when a driver is destroyed, it calls close() on all its operators before detaching itself from its parent task. All operators, with the exception of HashBuild and HashProbe, would have their resources released. The latter, however, would rely on their destructor being called, which could occur at any later point. The detachment of the driver from the task serves as a synchronization point. If we now rely on the destructor being called later, this introduces an element of indeterminism to the state of the resources. This unpredictability makes it difficult for memory management to make decisions during arbitration. This change aims to eliminate the abort() API and consolidate its functionality into close(). Additionally, it serializer access to HashBuild's internal state (table and spiller) to handle the case where it can be concurrently cleared by the task thread closing the operator and the being read by the last hash build operator attempting to build the hash table by fetching this internal state from all its peers. Differential Revision: D53818809
- Loading branch information
1 parent
032358e
commit 371d4ba
Showing
10 changed files
with
85 additions
and
41 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
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