forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix spill related issues in TopNRowNumber operator (facebookincubator…
…#11310) Summary: Pull Request resolved: facebookincubator#11310 This change fix two spilling related issues in TopNRowNumber: (1) close method for TopNRowNumber is not reenterable if the operator fails in the middle of processing as the close methods does in-place destruction to free up memory back to the HSA. This can cause problem in query abort code path as the aborted operator's close method could be called twice even through there is no-concurrency problem there. This PR fixes the issue by clearing the used hash table, row container and HSA on the first close. This is verified with unit test and failed LBM query. Note this is found in LBM stress test. (2) free the hash table after spill to clear more memory to make spill more efficient and verified with unit test by checking the operator's memory usage goes zero after spill. Reviewed By: bikramSingh91, oerling Differential Revision: D64654069 fbshipit-source-id: fb4bead42f4002071dcce8879dcf83f35ff6e6ea
- Loading branch information
1 parent
516cc9b
commit 005b52b
Showing
4 changed files
with
146 additions
and
20 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