DESCRIPTION

JCBC-544: Allow to select strategy for delivering server errors

When OnError.STOP specified (default), the library will stop processing
view results when encounter error in the stream. The error will be
propagated in onError() callback of the Observable

When OnError.CONTINUE specified, it will continue decoding response, and
return errors in ViewResult along with partial rows

Change-Id: Ica5eebc638a0b31782f1680f898eacade4af3897


COMMENTS

author: Cory Peck
date: 2014-09-12 19:26:15.745000000

Uploaded patch set 3.

-------------------------------------
author: Natasha Sullivan
date: 2014-09-15 08:03:58.542000000

Patch Set 3:

Yes I like that idea. We also probably want to come up with exceptions that always fail the observable, like if the design doc is not found.

-------------------------------------
author: Cory Peck
date: 2014-09-15 08:46:09.088000000

Patch Set 3: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2014-09-15 12:10:37.235000000

Patch Set 3:

(6 comments)

Line:207, src/integration/java/com/couchbase/client/java/DesignDocumentTest.java -> two remarks..

1) after a flatMap(). you can immediately subscribe too, no need for a intermediate variable.

2) as you guessed right its async and not deterministic since you never wait until its done. So in unit tests I recommend you to convert it into a blocking one and assert on the results synchronously.

Btw you need to rebase and the sync API will be there then, so you can either use async() and do the stuff in 2) or just use the sync api right away and dont care.

Line:241, src/integration/java/com/couchbase/client/java/DesignDocumentTest.java -> same here of course :)

Line:1, src/main/java/com/couchbase/client/java/error/ViewQueryException.java -> missing copyright header

Line:7, src/main/java/com/couchbase/client/java/error/ViewQueryException.java -> I know we're mising some, but always do it like this:

@author Cory Peck
@since 2.0 (don't forget the since tag)

Line:9, src/main/java/com/couchbase/client/java/error/ViewQueryException.java -> this is not needed to add those constructors.

In intellij just press "ctrl + enter" then go to constructors and add all possible ones. that's it :)

Line:225, src/main/java/com/couchbase/client/java/view/ViewQuery.java -> to be more compliant with the actual naming just remove the is and use "stopOnError". I tried to keep the namings as lean as possible to save ppl typing :)

Also, please always do a short summary line in addition to the return statement in the docblock

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