-
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
Use /tmp dir to store temporary index #4766
Conversation
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.
Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mangalaman93 and @manishrjain)
posting/index.go, line 515 at r1 (raw file):
// directory after the indexing step is complete. This deletes any other temp // indexes that may have been left around in case defer wasn't executed. tmpParentDir := filepath.Join(os.TempDir(), "dgraph_index")
Consider using https://golang.org/pkg/io/ioutil/#TempDir to avoid issues if multiple are going on or the temp folder is not properly deleted.
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @manishrjain and @martinmr)
posting/index.go, line 515 at r1 (raw file):
Previously, martinmr (Martin Martinez Rivera) wrote…
Consider using https://golang.org/pkg/io/ioutil/#TempDir to avoid issues if multiple are going on or the temp folder is not properly deleted.
That is what we are using if you see below. Just keeping everything in one folder though so that if we are looking for the directory for debugging or something, it would be easier to find.
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.
Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @martinmr)
posting/index.go, line 515 at r1 (raw file):
Previously, mangalaman93 (Aman Mangal) wrote…
That is what we are using if you see below. Just keeping everything in one folder though so that if we are looking for the directory for debugging or something, it would be easier to find.
Add a TODO here: If we get a complaint, we could move this to a flag, so a user can specify what the tmp dir should be.
Fixes #4600 While running dgraph as systemd service, we may not have permissions to create a folder in the current directory. Now, we instead use /tmp dir to store the temporary index solving the permission denied error.
8dca4df
to
f176a44
Compare
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.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain and @martinmr)
posting/index.go, line 515 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Add a TODO here: If we get a complaint, we could move this to a flag, so a user can specify what the tmp dir should be.
Done.
Fixes #4600 While running dgraph as systemd service, we may not have permissions to create a folder in the current directory. Now, we instead use /tmp dir to store the temporary index solving the permission denied error. (cherry picked from commit 8bf9046) Co-authored-by: Aman Mangal <[email protected]>
Fixes #4600
While running dgraph as systemd service, we may not have permissions to create a folder in the current directory. Now, we instead use /tmp dir to store the temporary index solving the permission denied error.
This change is
Docs Preview: