You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Paul Rogers (JIRA)" <ji...@apache.org> on 2016/11/21 16:34:58 UTC
[jira] [Created] (DRILL-5055) External Sort does not delete spill
file if error occurs during close
Paul Rogers created DRILL-5055:
----------------------------------
Summary: External Sort does not delete spill file if error occurs during close
Key: DRILL-5055
URL: https://issues.apache.org/jira/browse/DRILL-5055
Project: Apache Drill
Issue Type: Bug
Affects Versions: 1.8.0
Reporter: Paul Rogers
Assignee: Paul Rogers
Priority: Minor
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( )}}
{code}
if (outputStream != null) {
outputStream.close();
}
...
if (fs != null && fs.exists(path)) {
fs.delete(path, false);
}
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)