Skip to content
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 the stream framework to rebuild indices. #3686

Merged
merged 2 commits into from
Jul 19, 2019

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Jul 18, 2019

The stream framework can iterate over the index prefix keys concurrently
whereas currently there's only one thread iterating over the keys.
Changing to the stream framework should provide a speed up over the
current approach.


This change is Reviewable

The stream framework can iterate over the index prefix keys concurrently
whereas currently there's only one thread iterating over the keys.
Changing to the stream framework should provide a speed up over the
current approach.
@martinmr martinmr requested a review from manishrjain as a code owner July 18, 2019 21:11
posting/index.go Outdated Show resolved Hide resolved
@martinmr
Copy link
Contributor Author

The unit tests checking the rebuild process still pass. I manually checked that I could do full text queries after a rebuild with that index.

Copy link

@gitlw gitlw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @manishrjain and @martinmr)

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 2 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @martinmr)


posting/index.go, line 502 at r2 (raw file):

	stream := pstore.NewStreamAt(r.startTs)
	stream.Prefix = r.prefix

stream.LogPrefix = "Indexing..."

Copy link
Contributor Author

@martinmr martinmr left a 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, 2 unresolved discussions (waiting on @manishrjain and @martinmr)


posting/index.go, line 502 at r2 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

stream.LogPrefix = "Indexing..."

I'll do this in the next PR to avoid having to wait for another round of teamcity tests. Added a task in asana to avoid forgetting this.

@martinmr martinmr merged commit 9cb9ed8 into master Jul 19, 2019
@martinmr martinmr deleted the martinmr/rebuild-index-stream branch July 19, 2019 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants