Fixes COUCHDB-567 error with ErlView reduces.
Apparently we never tested ErlView reductions on 0.10.x? As far as I can tell they never should have worked. It was exactly as Sean Geoghegan described in that the interleaved calls to reduce where trouncing the mapper state.
Trunk uses the two process update scheme so wouldn't be affected by this trouncing. This patch is a stop gap to make ErlViews work. I've tested with the Futon test patch and an updated query_server_spec.rb to revalidate things are working.
Fixing this bug has made it quite apparent that the query server specs need to be drastically rethought. I spent quite a bit of time tracking down that the specs were actually testing that the subprocess died. ErlViews causing the host process to die would be very bad. In the future I'd like to see script/response sets and file stuctures for function definitions.
|