RFR: JDK-8225507: (zipfs): No space left on device not thrown with ZipFileSystem

Lance Andersen lance.andersen at oracle.com
Wed Feb 12 22:22:20 UTC 2020


A few observations from looking at:

close method:

Any open InputStreams are closed so there is a possibility of an IOException being thrown
The channel is closed in the same try block that sync() is invoked so there is a potential that if sync() fails the channel is not closed cleanly
the removal of the filesystem for URI based invocations of newFileSystem should/could be moved up after the Zip FS is moved closed
I suspect we should defer the throwing of the IOException if sync() fails until after we finish the rest of close() similar as is done for an IOException occurring while deleting the temp filess

sync method:

Looks like if the write of a CEN entry fails the IOException would be thrown where as an issue updating the LOC will just be ignored which I am not sure why that was done


Best
Lance

> On Feb 9, 2020, at 12:02 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> On 05/02/2020 23:34, Lance Andersen wrote:
>> Hi Jaikiran,
>> 
>> I think overall the patch is correct but it would be good to get some extra eyes on this.
> On the surface this looks okay but I think it would be useful if you (or Jai) could write a brief summary about the state of the file system and the underlying channel when the sync fails. I think the zip file system state will be closed (!isOpen) so a later attempt to close it will be a no-op. However, the state of the channel is not clear - is it open or closed?
> 
> -Alan

 <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200212/a1111308/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_sig_logo.gif
Type: image/gif
Size: 658 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200212/a1111308/oracle_sig_logo.gif>


More information about the nio-dev mailing list