DESCRIPTION

CBQE-368: add stale querying in threads

Add cases when queries with different stale parameters are run in different threaads

Change-Id: Ib6e5c82fec22cdbba8d26c030ac81357f733525c


COMMENTS

author: Hugo Blankenship
date: 2012-07-25 01:52:28.867000000

Patch Set 1:

Build Started http://qa.hq.northscale.net/job/testrunner-Jasmin Rangel-master/1926/ 

-------------------------------------
author: Hugo Blankenship
date: 2012-07-25 02:09:03.928000000

Patch Set 1: Verified

Build Successful 

http://qa.hq.northscale.net/job/testrunner-Jasmin Rangel-master/1926/ : SUCCESS

-------------------------------------
author: Titus Ho
date: 2012-07-25 02:33:23.585000000

Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

Not convinced this works as expected....There's a thread that runs stale=false queries in the background, but if user passes in stale=update_after tests expects that new docs aren't indexed.  I don't see how that's possible with stale=false queries running in bg which are adding docs to results.

Line:916, pytests/viewquerytests.py -> should be case_insensitive

-------------------------------------
author: Trevor Santana
date: 2012-07-25 04:15:41.332000000

Patch Set 1:

I wanted to recreate situation when 1 stale=false and 1 stale=false\update_after\ok queries are running simultaniously. First stale=false will trigger indexing, while indexind is building old  index should be returned for update_after and ok queries

-------------------------------------
author: Titus Ho
date: 2012-07-25 17:43:13.338000000

Patch Set 1:

Ok, the thing that I question is the thread you start just before _get_view_results has stale=false.

view.queries = [QueryHelper({"stale" : "false"} ...

# here you start back ground query thread with stale=false   
t.start()  

# here you query same view with ok/update_after
results = ViewBaseTests._get_view_results(self, self._rconn(), ...

Looks like a race case that can work "most" of the time.  But I wonder if stale=false can update the index and cause view_results to include new docs.

-------------------------------------
author: Trevor Santana
date: 2012-07-30 17:43:44.324000000

Patch Set 1: Abandoned

-------------------------------------
