Skip to content

Commit

Permalink
fix(indexing): use --tmp directory for building indexes (#7289) (#7300)
Browse files Browse the repository at this point in the history
Makes reindexing use directory passed through --tmp flag of alpha.

(cherry picked from commit 1707ecf)
  • Loading branch information
NamanJain8 authored Jan 15, 2021
1 parent a0228c9 commit 3dc8a20
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions posting/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,7 @@ func (r *rebuilder) Run(ctx context.Context) error {

// We write the index in a temporary badger first and then,
// merge entries before writing them to p directory.
// TODO(Aman): If users are not happy, we could add a flag to choose this dir.
tmpIndexDir, err := ioutil.TempDir("", "dgraph_index_")
tmpIndexDir, err := ioutil.TempDir(x.WorkerConfig.TmpDir, "dgraph_index_")
if err != nil {
return errors.Wrap(err, "error creating temp dir for reindexing")
}
Expand Down

0 comments on commit 3dc8a20

Please sign in to comment.