[R] Issues with open_dataset()
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
On using open_dataset, it creates a connection due to which the files in the directory get blocked and we cannot perform other operations on the file like replace!
Actual issue:
1. We are running an atomic operation on a bunch of files, which replaces the temp file names to the target file names.
1. But while this is happening, if we try to run open_dataset() on that particular directory, the atomic operation is failing and there are both target files and temp files in the directory.
1. It is blocking the files that have been read through open_dataset().
1. Please, provide me with more about how we can handle such problems.
1. Snapshot: 
**Reporter**: [N Gautam Animesh](https://issues.apache.org/jira/browse/ARROW-18313) / @gautamanimesh
#### Original Issue Attachments:
- [image-2022-11-11-09-19-16-065.png](https://issues.apache.org/jira/secure/attachment/13052095/image-2022-11-11-09-19-16-065.png)
- [image-2022-11-14-10-51-09-893.png](https://issues.apache.org/jira/secure/attachment/13052182/image-2022-11-14-10-51-09-893.png)
**Note**: *This issue was originally created as [ARROW-18313](https://issues.apache.org/jira/browse/ARROW-18313). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Start by reproducing the R open_dataset() scenario described in the issue, using a directory whose files are atomically replaced while the dataset is opened. Investigate how open_dataset() holds or releases file connections, and consider the attached snapshots and original ARROW-18313 for context. Done means the replacement operation can complete without leaving both target and temporary files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100