Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open files on windows with FILE_SHARE_DELETE #741

Merged
merged 5 commits into from
May 8, 2020
Merged

Conversation

alfred-landrum
Copy link
Contributor

@alfred-landrum alfred-landrum commented May 8, 2020

Address the occasional rename related failures on Windows by using the FILE_SHARE_DELETE flag when opening files on Windows. As noted in #613, this unfortunately requires copying substantial code from the os package, as there's no way to use that flag with the existing os.Open api.

Fixes #613

@alfred-landrum
Copy link
Contributor Author

I've created a Brim branch that uses this zq, and it shows many clean CI runs on Windows:
brimdata/zui#763

@alfred-landrum alfred-landrum requested a review from a team May 8, 2020 01:29
@henridf
Copy link
Contributor

henridf commented May 8, 2020

The zql/ os.Opens are still there, how about porting those over too?

@alfred-landrum
Copy link
Contributor Author

The zql/ os.Opens are still there, how about porting those over too?

So zql/zql.go is a generated file from pigeon, which is why I had not updated it. I can make update the 2 use cases in zql_test.go, though.

@aswan
Copy link

aswan commented May 8, 2020

A parser's OpenFile() method is boilerplate that pigeon creates but we never use that method...

@henridf
Copy link
Contributor

henridf commented May 8, 2020

So zql/zql.go is a generated file from pigeon, which is why I had not updated it. I can make update the 2 use cases in zql_test.go, though.

Ah, had missed that. My goal was simply to make it easy to grep -R os.Open and be sure there were none.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

occasional file i/o "access is denied" errors during pcap ingest in windows CI with brim
3 participants