Open
Conversation
95a9500 to
d4b4225
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Nouveau switched from ibrowse to gun (and http/1.1 to http/2) in 3.5.0, in order to reduce the large number of connections made between couchdb and nouveau server. A user has found, on a larger test than I performed during code development, a significant indexing speed regression.
Before the ibrowse to gun transition the update requests to nouveau server used http pipelining (that is, multiple requests were made to the server, in order, without waiting for the responses). This was a significant optimization. With gun this was not possible (as http/2 uses multiplexing instead). The difference turns out much more significant that expected.
This PR adds a new endpoint on the nouveau server that handles a streamed request body in
application/json-seqformat. Each sequence of the request body is a document update or delete request. This reintroduces a concept like pipelining but within a single http request, and thus ordering is preserved. At each row upload we check to see if there has been an error response (the nouveau server will start the HTTP response only on error or at the end of the index updating process).This has demonstrated a substantial performance improvement.
There is work still to do but am making a PR to make it easier for others to try this out. Remaining work includes ensuring a smoosh upgrade path and annotating the deprecated parts of nouveau server for the release after the one that introduces the streaming
updatesendpoint.Testing recommendations
Will be covered by automated tests
Related Issues or Pull Requests
#5894
Checklist
rel/overlay/etc/default.inisrc/docsfolder