-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix(dgraph): Fix dgraph crash on windows #7261
Conversation
There were two issues on windows 1. We were trying to delete a file with open file descriptors. This doesn't work on windows. The PR dgraph-io/ristretto#242 in ristretto fixes this. 2. We were using path.Join instead of filepath.Join. The path package is supposed to be used only on unix systems. In windows the "\" is the path separator instead of "/".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we abandon usages of path
then? For example at
Line 95 in d13e744
return path.Join(dir, fmt.Sprintf("%05d%s", id, logSuffix)) |
Also go.mod would need to be updated once ristretto PR is merged.
@NamanJain8 nice catch. I'll update all the occurrences of |
✔️ Deploy preview for dgraph-docs ready! 🔨 Explore the source changes: 39441a0 🔍 Inspect the deploy logs: https://app.netlify.com/sites/dgraph-docs/deploys/5ffc94e8ff04fa00076dee9c 😎 Browse the preview: https://deploy-preview-7261--dgraph-docs.netlify.app |
There were two issues on windows 1. We were trying to delete a file with open file descriptors. This doesn't work on windows. The PR dgraph-io/ristretto#242 in ristretto fixes this. 2. We were using path.Join instead of filepath.Join. The path package is supposed to be used only on Unix systems. In windows the "" is the path separator instead of "/". (cherry picked from commit 5aec243)
There were two issues on windows 1. We were trying to delete a file with open file descriptors. This doesn't work on windows. The PR dgraph-io/ristretto#242 in ristretto fixes this. 2. We were using path.Join instead of filepath.Join. The path package is supposed to be used only on Unix systems. In windows the "" is the path separator instead of "/". (cherry picked from commit 5aec243)
There were two issues on windows
doesn't work on windows. The PR
fix(MmapFile): Close the fd before deleting the file ristretto#242 in ristretto fixes this.
supposed to be used only on unix systems. In windows the "" is the path
separator instead of "/".
This change is