rnewson opened a new pull request, #5617:
URL: https://github.com/apache/couchdb/pull/5617

   ## Overview
   
   optimize searches when index is fresh
   
   Send the search request first and use the 409 Conflict response to trigger 
index update (as long as query param 'update' is not set to false). This 
eliminates a round-trip on every search request when the index is up to date at 
the cost of an additional search request when it isn't (though the additional 
search request is rejected with a 409 based on the index state, no additional 
Lucene query is executed).
   
   I also fixed a bug for the update=false case. If the index never becomes 
fresh (via `ken` background) the search request loops until we hit a timeout. 
What now happens is we'll return whatever the out-of-date search indexes return.
   
   ## Testing recommendations
   
   TBD
   
   ## Related Issues or Pull Requests
   
   N/A
   ## Checklist
   
   - [x] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [ ] Documentation changes were made in the `src/docs` folder
   - [ ] Documentation changes were backported (separated PR) to affected 
branches
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to