You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (Jira)" <ji...@apache.org> on 2019/09/30 22:47:00 UTC

[jira] [Resolved] (ARROW-6740) [Python] Unable to delete closed MemoryMappedFile on Windows

     [ https://issues.apache.org/jira/browse/ARROW-6740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes McKinney resolved ARROW-6740.
---------------------------------
    Fix Version/s: 1.0.0
       Resolution: Fixed

Issue resolved by pull request 5551
[https://github.com/apache/arrow/pull/5551]

> [Python] Unable to delete closed MemoryMappedFile on Windows
> ------------------------------------------------------------
>
>                 Key: ARROW-6740
>                 URL: https://issues.apache.org/jira/browse/ARROW-6740
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.14.1
>         Environment: Windows 10
>            Reporter: Sergey Mozharov
>            Assignee: Antoine Pitrou
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.0.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> {code:java}
> import os
> import pyarrow as pa
> # Create a file and memory-map it
> file_name = 'path-to-a-new-file'
> mmap = pa.create_memory_map(file_name, 100)
> # or open an existing file
> # file_name = 'path-to-an-existing-file'
> # mmap = pa.memory_map(file_name)
> # close it
> mmap.close()
> mmap.closed  # True
> # try to delete it (can't delete until the python interpreter is killed)
> os.remove(file_name)  # PermissionError
> # Note: opening an existing file as `pa.input_stream` works as expected{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)