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

wal: fsync directory after wal file rename #6381

Merged
merged 2 commits into from
Sep 8, 2016

Conversation

heyitsanthony
Copy link
Contributor

Fixes #6368

@xiang90
Copy link
Contributor

xiang90 commented Sep 7, 2016

lgtm

@heyitsanthony heyitsanthony force-pushed the fix-wal-rename branch 6 times, most recently from 985346d to bd7107b Compare September 8, 2016 07:08
Anthony Romano added 2 commits September 8, 2016 00:09
Windows needs to open a directory with write access to fsync but the go
runtime won't open directories that way.
return os.NewFile(uintptr(fd), path), nil
}

func openDir(path string) (fd syscall.Handle, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be right. but i am not a window expert...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was testing on a VM to figure this out. The joy of windows.

@xiang90
Copy link
Contributor

xiang90 commented Sep 8, 2016

lgtm

@heyitsanthony heyitsanthony merged commit bb3ba1e into etcd-io:master Sep 8, 2016
@heyitsanthony heyitsanthony deleted the fix-wal-rename branch September 8, 2016 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants