diff --git a/loader/loader.go b/loader/loader.go index aa46cd220ab8bc7d71f262c82c3d84592e9d27b3..64fd1b664388cd04cde197310074caa9e0a52cf8 100644 --- a/loader/loader.go +++ b/loader/loader.go @@ -165,7 +165,7 @@ func (s *state) getUidForString(str string) error { if err == posting.E_TMP_ERROR { time.Sleep(time.Microsecond) glog.WithError(err).WithField("nq.Subject", str). - Error("Temporary error") + Debug("Temporary error") } else { glog.WithError(err).WithField("nq.Subject", str). Error("While getting UID") diff --git a/server/loader/main.go b/server/loader/main.go index 3b5bc31fbb1a041db42524eb6f8d51b447219a88..63302a10550b087a60a8ab4acf9e99db715f7286 100644 --- a/server/loader/main.go +++ b/server/loader/main.go @@ -41,8 +41,9 @@ var instanceIdx = flag.Uint64("instanceIdx", 0, var numInstances = flag.Uint64("numInstances", 1, "Total number of instances among which uid assigning is shared") var postingDir = flag.String("postings", "", "Directory to store posting lists") -var uidDir = flag.String("uidDir", "", "Directory to read UID posting lists") +var uidDir = flag.String("uids", "", "Directory to read UID posting lists") var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file") +var memprofile = flag.String("memprofile", "", "write memory profile to file") var numcpu = flag.Int("numCpu", runtime.NumCPU(), "Number of cores to be used by the process") @@ -108,4 +109,13 @@ func main() { } glog.Info("Calling merge lists") posting.MergeLists(100 * numCpus) // 100 per core. + + if len(*memprofile) > 0 { + f, err := os.Create(*memprofile) + if err != nil { + glog.Fatal(err) + } + pprof.WriteHeapProfile(f) + f.Close() + } }