Description
In TaskLog.java, Temporary Index File is created by following code.
BufferedOutputStream bos = new BufferedOutputStream( SecureIOUtils.createForWrite(tmpIndexFile, 0644)); DataOutputStream dos = new DataOutputStream(bos);
The code is surrounded by try-finally so if some Exception/ERROR is thrown between constructing bos and dos, temporary file is not cleaned up.
I met the situation that when a thread ran, OOM was thrown after bos created and temporary file is not cleaned up. At different time, another thread executed same logic and fail because of FileAlreadyExistsException.