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

Initialization leads to Access Denied on Windows #42

Open
williamb1024 opened this issue Dec 24, 2024 · 1 comment
Open

Initialization leads to Access Denied on Windows #42

williamb1024 opened this issue Dec 24, 2024 · 1 comment

Comments

@williamb1024
Copy link

williamb1024 commented Dec 24, 2024

The fsync operations performed in the code referenced below always result in an access denied result when performed on a Windows OS.

raft-wal/metadb/metadb.go

Lines 135 to 145 in cc4505d

// And Fsync that parent dir to make sure the new new file with it's new name
// is persisted!
dirF, err := os.Open(dir)
if err != nil {
return err
}
err = dirF.Sync()
closeErr := dirF.Close()
if err != nil {
return err
}

A similar issue:
https://support.hashicorp.com/hc/en-us/articles/27722437245715-Consul-Snapshot-Not-Supported-by-Windows

Additional use of Sync on a directory:

raft-wal/fs/fs.go

Lines 117 to 127 in cc4505d

func syncDir(dir string) error {
f, err := os.Open(dir)
if err != nil {
return err
}
err = f.Sync()
closeErr := f.Close()
if err != nil {
return err
}
return closeErr

@williamb1024
Copy link
Author

Is this the correct place to open this issue?

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

No branches or pull requests

1 participant