-
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
Add additional logs to show progress of reindexing operation. #3746
Conversation
The logs are V(1) like the rest of the reindexing logs.
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, all discussions resolved (waiting on @manishrjain)
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.
Logs are a bit too noisy. I tried doing the following:
-
Load up 21-million movie data set.
-
Reindex the
name
predicate by adding the exact index:curl localhost:8180/alter -d 'name: string @index(hash, term, exact, fulltext, trigram) @lang .'
I saw over 2000 lines of log output about the reindexing progress in the alpha logs over the timespan of 1m23s.
Maybe decrease how often we print out the logs (say, every 100k keys) or output a log every so often e.g., every 5 seconds.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @manishrjain)
See attached alpha1.log for the progress logs when reindexing |
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.
I also already see logs like these that mention the index rebuilding process and time elapsed. This comes from posting/index.go:
Rebuilding index for predicate name Time elapsed: 37s, bytes sent: 0 B, speed: 0 B/sec
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @manishrjain)
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.
Please do not merge this as it is. See my comments. Also, @danielmai 's comments.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain and @martinmr)
posting/index.go, line 531 at r1 (raw file):
} counterChan <- struct{}{}
Pushing on a channel for every key is very contentious. This would single-handedly kill performance.
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.
I removed the logs during the stream phase since the stream framework is already providing logs and there's no way to do this without having to use some kind of contention to accurately count the number of keys processed.
I added logs for the phase that writes the deltas to disk. I also updated the logs to all have the same prefix ("Rebuilding index for predicate ...").
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain)
posting/index.go, line 531 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Pushing on a channel for every key is very contentious. This would single-handedly kill performance.
Removed this code.
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)
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 r2.
Reviewable status: complete! all files reviewed, all discussions resolved
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: complete! all files reviewed, all discussions resolved
The logs are V(1) like the rest of the reindexing logs.
Fixes #3741
This change is