Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.8.0
-
None
-
None
Description
DRILL-3898 recently fixed a case in which disk space was exhausted during a spill event for the external sort. In this case, the call to close failed because close attempted to flush remaining buffered data, but that also failed due to out of space.
While the fix works, the fix causes the partially-completed spill file to be left on disk. Consider this code in BatchGroup.close( )
if (outputStream != null) { outputStream.close(); } ... if (fs != null && fs.exists(path)) { fs.delete(path, false); }
Notice that, if the output stream close fails, the spill file is not deleted. The fix is to put the delete in a finally block so that it is always deleted.