Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: couchbase/couchbase-java-client
...
head fork: couchbase/couchbase-java-client
Checking mergeability… Don't worry, you can still create the pull request.
Commits on Feb 01, 2012
@mikewied mikewied Changed spy jar configuration to default
We changed this in spymemcached during the release so that it would
be added as a normal compile time dependency for users who add the
spy dependency to their pom files. I changed it in the pom config but
not in the project config that we use for development.

Change-Id: I34175919faec283d993a57f9a2b5f15646ccce0b
Reviewed-on: http://review.couchbase.org/12841
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
1a3c1cf
Commits on Feb 06, 2012
@ragsns ragsns Added unlock operation
Based on patch submitted by Brent Ryan.

Change-Id: I9a30f21108fcbbd43add4abd2f16af05a3fbe68b
Reviewed-on: http://review.couchbase.org/12907
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
a606674
Commits on Feb 08, 2012
@ragsns ragsns Fixes for adding only hostname instead of both hostname and ip address
Change-Id: Ieae49545e1c08f2cb9155f926015046a787c0f5b
Reviewed-on: http://review.couchbase.org/13046
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
8ba2619
Commits on Feb 13, 2012
@mikewied mikewied Fixed checkstyle issues.
Change-Id: I767ed66a6c3b36016300448a2075ada7071dfbae
Reviewed-on: http://review.couchbase.org/13082
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
b464e08
Commits on Feb 20, 2012
@ingenthr ingenthr Depend on spymemcached 2.8.1-SNAPSHOT.
I've pushed a tag to the first commit on spymemcached after
the last release, verified that it's building/installing
with the snapshot tag.  Then based this on it.  We need
to release them in order, obviously.

Seems like the best flexibility for now with how things are
changing.

Change-Id: I8edc64963b074fe558a8e4cd42b3ff9e0af26dc2
Reviewed-on: http://review.couchbase.org/13372
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
4a38b26
@mikewied mikewied Use TapStream abstraction in spymemcached
This will allow our tap streams to be able to connect to
all node in the cluster.

Change-Id: I233a8fc96bb55cf12e73e40f46281dd3870004b5
Reviewed-on: http://review.couchbase.org/13083
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
7d9b64a
@mikewied mikewied Use TapAck from Spymemcached
This change removes duplicate code.

Change-Id: I7cf569e6c96f41af5bab51aabe402662f49282af
Reviewed-on: http://review.couchbase.org/13085
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
b68dc17
@ingenthr ingenthr Added a note about TAP interface stability.
Change-Id: Ida28a8804777fddf0a8e47f7b3adecbdc7b0b633
Reviewed-on: http://review.couchbase.org/13373
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
88bb58b
@ingenthr ingenthr Fixed a number of TAP test issues.
Change-Id: I1193262637596d0576838a67db7a61ff1447ad37
Reviewed-on: http://review.couchbase.org/13394
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
f1d750e
Commits on Mar 12, 2012
@ragsns ragsns Correctly shut down connection from TapClient. JCBC-16
Fix based on http://www.couchbase.com/issues/browse/JCBC-16

Change-Id: Iefa5d36a1263350a5e61f54d2f65796dec9b808f
Reviewed-on: http://review.couchbase.org/13848
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
0d87dd2
@ragsns ragsns Fixed a javadoc issue
Change-Id: Ic6957078afdf56c16f2e44c3a269b3e31a8bb466
Reviewed-on: http://review.couchbase.org/13847
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
97e6276
Commits on Mar 21, 2012
@mikewied mikewied Added support for views
Change-Id: I67a5912f2b329151c15cff7fc89ab7ef3700503e
Reviewed-on: http://review.couchbase.org/13688
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
beda277
@ragsns ragsns Add support for stale=false which is needed from 2.0 DP4 and later
Change-Id: Id1956b6467ae02c2fae69d7cf252e3c62507cc82
Reviewed-on: http://review.couchbase.org/13849
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
c7410b3
Commits on Mar 22, 2012
@ingenthr ingenthr Add httpcomponents to ivy file for makepom.
Change-Id: I04508e00b77b7b6e6936f43e3d130ad22e5cdf9d
Reviewed-on: http://review.couchbase.org/14157
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
b0cd3ab
@ingenthr ingenthr Update dependencies to spymemcached 2.8.1.
Change-Id: I86e4ee1c29f16eff16c3057db12f190158f5ee30
Reviewed-on: http://review.couchbase.org/14178
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
cf95135
Commits on Apr 05, 2012
@ragsns ragsns Use the correct default Hashing Algorithm - JCBC-29
Change-Id: Ifb1a9ebcc7ae64a8590f1123ddde9138c17fe23e
Reviewed-on: http://review.couchbase.org/14485
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
ce7a084
@mikewied mikewied Fixed checkstyle errors
Change-Id: I1ae53a088077e098313231f2d044a0ca61c1fd46
Reviewed-on: http://review.couchbase.org/14562
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
4d34594
@ingenthr ingenthr Reconnect to configuration stream if disconnected. JCBC-19
With this change, a Bucket which is marked as disconnected will be
later reconnected when noticed by a calling thread.

The logic for this is a little convoluted at the moment, but tests
to be correct.  In the future, this whole section should be refactored
to be a better NodeLocator or something similar.  See JCBC-28.

Change-Id: I8541493fdf7e8c504c4cbd512ca43e3416b03829
Reviewed-on: http://review.couchbase.org/14574
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
7c049c5
@ingenthr ingenthr Change back to spymemcached 2.8.0 for this branch.
Change-Id: I38ef9d66544f30f8101ca04889b8042c1abfc177
Reviewed-on: http://review.couchbase.org/14586
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
02df7a7
Commits on Apr 30, 2012
@ingenthr ingenthr Missing space added to log message when node is down.
Change-Id: Ifad8da0b4e42f4f58945510de8513e6a7f1424e2
Reviewed-on: http://review.couchbase.org/15462
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
b424ca4
Commits on May 22, 2012
@ingenthr ingenthr Added additional ctor to avoid username. JCBC-38.
Change-Id: If487df95e2974f0a4c60e3c57978a82596967de6
Reviewed-on: http://review.couchbase.org/15435
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
df18fb4
@ingenthr ingenthr Update dependencies to spymemcached 2.8.1. JCBC-39.
Change-Id: I9d4e1099edbe4d32d80af22b19cfd3dad6bde221
Reviewed-on: http://review.couchbase.org/15436
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
0e37394
Commits on Jun 02, 2012
@mikewied mikewied JCBC-47: Query now copies include_docs correctly
Change-Id: I9a894bb86530f36151c5075d2da814a66e3f4e9f
Reviewed-on: http://review.couchbase.org/15954
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
f660e19
@mikewied mikewied Removed redundent code in setStale() function in Query class
Change-Id: Ie46923fde6ff5bccbf92a9da6af17769b5e44efa
Reviewed-on: http://review.couchbase.org/15955
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
f109007
@mikewied mikewied JCBC-24: Create setGroupLevel() function in Query class
I removed the setGroup(boolean group, int group_level) function
since group overrides group_level making this function useless. I
turned this function into the setGroupLevel() function.

Change-Id: I98ea665c8bae73ae0940863ef84c426cfade01c1
Reviewed-on: http://review.couchbase.org/15956
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
ba75181
Commits on Jun 04, 2012
@mikewied mikewied Support error codes in OperationStatus class
Change-Id: If6bd4c86a28b892018385921b0f7c98172225410
Reviewed-on: http://review.couchbase.org/15953
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
9e72d86
@mikewied mikewied JCBC-44: Check if op is null before checking if it is cancelled
Change-Id: I960a31110484007b9ac6b3735c9cd2ce9ca79e60
Reviewed-on: http://review.couchbase.org/15957
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
a2dcbc0
@mikewied mikewied JCBC-42: Close properties file after using it
Change-Id: I1daa439afd2e88b55f04a63b7c42a9a7f18244e2
Reviewed-on: http://review.couchbase.org/15958
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
0af5374
Commits on Jun 05, 2012
@ingenthr ingenthr Do not override fetching of AuthDescriptor. JCBC-59
Change-Id: Iff02589db6e1a3c3f56108a647e37b821b6cc447
Reviewed-on: http://review.couchbase.org/16765
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
0c9d2d3
Commits on Jun 29, 2012
@mikewied mikewied JCBC-20: ViewConnection blocks when no ops pending
When getting the next op in the queue we were using the poll()
function which immediately returns null if the queue is empty. This
immediate return causes the IO thread to spin and consumes a lot of
cpu. What we really want is to block when getting an item from the
queue until one is available. In order to do this we should be using
the take() function.

Change-Id: I9a5bcb4c3852976b55b3162fad513156e94aaaf6
Reviewed-on: http://review.couchbase.org/14959
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
e39cd76
@mikewied mikewied JCBC-43: Make VBucketNodeLocator nested classes static final
Change-Id: I937829e51621d8ed6a0e54b1b079cc338ffab059
Reviewed-on: http://review.couchbase.org/16703
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
c66354d
@mikewied mikewied JCBC-68: Copy key correctly in query
Change-Id: I26a9470a7a39caf913338126dfb918c8774774cd
Reviewed-on: http://review.couchbase.org/17742
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
e565ba0
Commits on Jul 11, 2012
@mikewied mikewied Change spymemcached dependency to 2.8.2-SNAPSHOT
Change-Id: I0d3968baa57c3736af2c992eaf169ab6e3dabb37
Reviewed-on: http://review.couchbase.org/18194
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
a407211
Commits on Jul 12, 2012
@mikewied mikewied JCBC-72: Throw exception for non-200 http view responses
Change-Id: Iee0b1de24a9ea245b6554aea5a30462cf7b613ef
Reviewed-on: http://review.couchbase.org/18094
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
9a3e207
@mikewied mikewied Fixed incorrect error handling in view parsing
This should call setException because setException set errored
to true. If errored is not set then the Future won't properly
throw and exception.

Change-Id: I71288cda2f6fe27c9dc9ae83968efe81d6fe154d
Reviewed-on: http://review.couchbase.org/18197
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
2390ecc
Commits on Jul 20, 2012
@mikewied mikewied Fix checkstyle errors
Change-Id: I87007bd428da34badc0d5a10ef17aa50b8132804
Reviewed-on: http://review.couchbase.org/18655
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
98b9d82
Commits on Jul 24, 2012
@ingenthr ingenthr Update deps to spy 2.8.2-SNAPSHOT
This will be replaced before release with the non-snapshot.

Change-Id: Ia9800f9f63279c4716963066dc059e88aa009119
Reviewed-on: http://review.couchbase.org/18755
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
468a425
@ingenthr ingenthr Use the correct Connection type for the config. JCBC-53
In the refactoring of the client into two packages, we lost
the functionality that would handle reconfiguration from
MemcachedConnections.  This change introduces a
CouchbaseMemcachedConnection which extends the MemcachedConnection
and implements reconfiguration.  By doing so, we properly handle
add and remove node events from the cluster.

Change-Id: Ief068cab934542617a11e2f527d98b9c38affd07
Reviewed-on: http://review.couchbase.org/16337
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
5bd2319
@ingenthr ingenthr Ensure config update checks do not overwhelm the system. JCBC-54.
Change-Id: Id0514278608fa1476e21c0f52958860404240561
Reviewed-on: http://review.couchbase.org/16338
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
4c73aa8
Commits on Jul 25, 2012
@ingenthr ingenthr Honor TestConfig in syncGetTimeoutsInitClient().
Change-Id: I6b1d9cba8598799177f686016970ca254e9cec9e
Reviewed-on: http://review.couchbase.org/18758
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
5c1d311
@ingenthr ingenthr Workaround NOT_MY_VBUCKET during optimization, and test.
On SPY-91, it was found that receiving a NOT_MY_VBUCKET
response in the middle of an optimized batch of requests
will upset things by causing the optimized operation itself
to be unqueued for reads, rather than retrying the contained
operation.

Since the severity level is high and the workaround is
straightforward (disable optimization) this commit both
disables optimization and introduces the test which helped
find the cause of the issue.

Recommended way of verifying this would be to remove the
two sections related to disabling optimization and then
verify the test fails.

Change-Id: I20aa2945bbbbe9f19a56a41224244fe368d5e34e
Reviewed-on: http://review.couchbase.org/18757
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
36f97dc
Commits on Jul 30, 2012
@ingenthr ingenthr JCBC-88: Fix resubscr by not waiting long and asynch subscribing.
It was found during autofailover testing that the client
did not recover well.  The problem was that we completed the
resubscription on one of the callers threads.  The subscription
can take upward of 700ms, but if the caller adjusts their timeout
for operations to be lower, we don't complete the resubscription.

This change does a couple of things:
1) doesn't allow the connection for any individual HTTP request
   (non-streaming) to take longer than 500ms to establish for
   purposes of faster failover
2) changes resubscription to occur in a thread temporarily
   spawned by the CouchbaseConnectionFactory, so it can complete
   even if the caller's request times out.

This has been tested to show autofailover working correctly.

Change-Id: I87582b99fa872530a62a336b3144fefc60b63f6e
Reviewed-on: http://review.couchbase.org/19008
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
7e4339a
@ingenthr ingenthr Add a few minor override annotations.
Change-Id: I943c6253c55fa96f6a567dacd2598192f512f21b
Reviewed-on: http://review.couchbase.org/19012
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
9952e10
@ingenthr ingenthr Add default test type to ant build.
Change-Id: Ib0cc409a440ff5b485d6a188f77867abc79bc204
Reviewed-on: http://review.couchbase.org/19017
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
d026763
@ingenthr ingenthr Added a simple README.
Change-Id: I71ee47b5f3c3260657ec70644f63d9a58eb73055
Reviewed-on: http://review.couchbase.org/19018
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
f122ff2
Commits on Jul 31, 2012
@ingenthr ingenthr Update spymemcached depedency to 2.8.2 release.
Change-Id: I2f3099dc885de9e78ca67607174408ad5b075d0e
Reviewed-on: http://review.couchbase.org/19051
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Jasdeep Jaitla <jasdeep@couchbase.com>
5b3f66f
Commits on Aug 08, 2012
@ingenthr ingenthr Add HTTP Basic Authorization for View Requests. JCBC-95
Change-Id: I51dde71b94f99dc0a5db8e9877fa94db45b718f2
Reviewed-on: http://review.couchbase.org/19373
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
3891452
Commits on Aug 11, 2012
@ingenthr ingenthr Make fields of HttpOperation volatile for concurrent access.
Change-Id: Ia55c4a4a3ef30affe9fea5d5f9623a79e4b91a4b
Reviewed-on: http://review.couchbase.org/18807
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
92a87ff
Commits on Aug 14, 2012
@mikewied mikewied Fix checkstyle errors
Change-Id: Id044e448f2ec1b9f83c06bacf21ccdc1f123110b
Reviewed-on: http://review.couchbase.org/19605
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
f8857d6
Commits on Aug 18, 2012
@mikewied mikewied JCBC-96: Remove the queue mechanism in ViewConnection
This change removes the queueing mechanism that hold operations
before being given to an individual ViewNode. The operations are
now passed directly to a ViewNode and if there are too many
operations then they are held as pending requests until the
ViewNode is ready to process them. On node shutdown the pending
ops are requeued through a callback function that redistributes
them equally to the rest of the ViewNodes.

Change-Id: Ieffbb45123cf47153cea662df1a01f5b2266c8d3
Reviewed-on: http://review.couchbase.org/19606
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
0443cd9
@ingenthr ingenthr Depend upon 2.8.3-SNAPSHOT
Change-Id: Idb97b900ec1856b75df631bfe620c73b11bedb1e
Reviewed-on: http://review.couchbase.org/19673
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
113ad2e
Commits on Aug 19, 2012
@mikewied mikewied Remove dependency on ErrorCode, which was revereted in spymemcached.
Change-Id: Ife8c127ad3d0e9bfc7648f2f8e87e62a5ec4e0f9
Reviewed-on: http://review.couchbase.org/19674
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
d6100b2
@ingenthr ingenthr Added better debug logging on ViewNode error handling.
Change-Id: Ic1ee33df0a95ce285143269b9cc1246cc8be0913
Reviewed-on: http://review.couchbase.org/18808
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
228b3cd
@ingenthr ingenthr Make diagnosis of HTTP connection startup better.
Change-Id: I49d9f44aca5adad8f070cca661c990c9de306853
Reviewed-on: http://review.couchbase.org/19675
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
5502ef8
@ingenthr ingenthr Added asserts to ensure expected view handling.
Change-Id: I191ff4bfdd61aec26afb146aa3aa9de4d315f9c0
Reviewed-on: http://review.couchbase.org/19676
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
d9ae5a9
@ingenthr ingenthr Change tests to use bucket delete/create instead of flush_all.
Recent changes of Couchbase Server 2.0 have flush_all disabled
by default. It's also not correct to re-enable flush_all
(though possible) as it won't really behave correctly.

This change shifts to a bucket delete followed by a bucket create.
It's not the best change in that it introduces a lot of sleep time
instead of checking for bucket availability with some other poll,
but does appear to be reliable.

After the integration of RESTful flush in MB-5170, we should be
able to trim some of the time of running tests again and remove
the sleeps in here.

Change-Id: I80ed8bb311afc8dde3970db0cbad6687f58c0048
Reviewed-on: http://review.couchbase.org/19677
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
b9aa7c1
@ingenthr ingenthr Merge branch 'release10'
By Matt Ingenthron (16) and others

* gerrit/release10:
  Added a simple README.
  Add default test type to ant build.
  Add a few minor override annotations.
  JCBC-88: Fix resubscr by not waiting long and asynch subscribing.
  Workaround NOT_MY_VBUCKET during optimization, and test.
  Honor TestConfig in syncGetTimeoutsInitClient().
  Ensure config update checks do not overwhelm the system.  JCBC-54.
  Use the correct Connection type for the config.  JCBC-53
  Update deps to spy 2.8.2-SNAPSHOT
  Fix checkstyle errors
  Do not override fetching of AuthDescriptor.  JCBC-59
  Added additional ctor to avoid username. JCBC-38.
  Missing space added to log message when node is down.
  Reconnect to configuration stream if disconnected. JCBC-19
  Use the correct default Hashing Algorithm - JCBC-29

Conflicts:
	ivy/libraries.properties
	src/main/java/com/couchbase/client/CouchbaseClient.java
	src/main/java/com/couchbase/client/CouchbaseConnection.java
	src/main/java/com/couchbase/client/CouchbaseConnectionFactory.java

Change-Id: Idefa785503f0dae99624af7172ba38f54087a45e
924d301
@ingenthr ingenthr Disable tests related to flush after change to test fixtures.
Change-Id: I0225828c83cd70ee3ae9fdea66f226a22c183e32
Reviewed-on: http://review.couchbase.org/19691
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
d0dd7f9
@ingenthr ingenthr Better logging on testGetAvailableServers in failure case.
Change-Id: Id14c724e9a6ea40f10e4691f09f3bca4f4f8f821
Reviewed-on: http://review.couchbase.org/19692
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
b6df3e4
@ingenthr ingenthr Fixes for TapTest based on new flush.
Change-Id: Ib8be84252cc34eb3c5ec12b039abbcb410cd6a54
Reviewed-on: http://review.couchbase.org/19693
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
b0e561a
@ingenthr ingenthr Adapt OptimizedStoreVbucketTest to new test fixtures.
Change-Id: Id4a3268f42124ace70531f10674b817b7464c15c
Reviewed-on: http://review.couchbase.org/19694
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
7a6976c
@ingenthr ingenthr Fixes for view authentication when adding design docs.
Change-Id: I78fd48c5fb18a2622ed0a9f0aa80f317537e70a3
Reviewed-on: http://review.couchbase.org/19758
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
93e59f0
@ragsns ragsns Add support for synchronous set via Observe operation.
This change introduces a simple synchronous set which
uses the underlying observe command introduced in
spymemcached 2.8.3.  This command is a binary command only
and is in Couchbase Server 2.0 (approx. build 1495) only.

Conflicts:
	src/test/java/com/couchbase/client/CouchbaseClientTest.java

Change-Id: I6a1e8af54ef13d4a40a5dcc21bb7a939fb63499f
Reviewed-on: http://review.couchbase.org/19068
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
4460d26
@ragsns ragsns Add support for a synchronous delete, via observe operation.
This change adds support for a synchronous delete, including
detection of full delete versus logical delete.

The main use case behind this feature is that if using
Couchbase Server 2.0, and wanting to query views, one may
wish to ensure a delete has been persisted to know that
a subsequent query with .setStale(false) will take the
deletion into account when generating the index.

Change-Id: I99ad5b5089992a7df2c2ab12e487d043265df21f
Reviewed-on: http://review.couchbase.org/19778
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
47bc98a
@ingenthr ingenthr Rename README since ant clean kept removing it.
Change-Id: I2eada518c22bc345c113c0b786e200fd931e0567
Reviewed-on: http://review.couchbase.org/19838
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
bbbeb76
@ingenthr ingenthr Checkstyle fixes from merge commit.
Initially, I tried to rebase this to be the first commit after
the merge, but git would keep losing it even when using -p during
rebase.

Change-Id: If9c79e0139ab60261e67195037686de3a446a373
Reviewed-on: http://review.couchbase.org/19839
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
66115ce
@ingenthr ingenthr Checkstyle misc. fixes.
This fixes a number of checkstyle issues which have been
around for a while.  Some are still in code review, but a merge
commit is a bit in the way of putting things in the right order.

Change-Id: Icd79b614ef53840130abd8ec8adf1ebdb8fccdb4
Reviewed-on: http://review.couchbase.org/19840
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
4e05917
Commits on Aug 20, 2012
@ingenthr ingenthr Minor typo in test log message.
Change-Id: Id0713e7df30b0a828af3122ad9623c3e9240c245
Reviewed-on: http://review.couchbase.org/19860
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
5bb4b36
@ingenthr ingenthr Update to depend on released spymemcached 2.8.3
Change-Id: I20765441809571c2660b661032ba3bc4a681165f
Reviewed-on: http://review.couchbase.org/19861
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
e8ff311
@ingenthr ingenthr Updated README to map up to the 1.1 DP state.
Change-Id: Ia810d5b6f1418476fc2118e3501e0c69f2d6da79
Reviewed-on: http://review.couchbase.org/19862
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
0b92ee2
Commits on Aug 21, 2012
@ragsns ragsns Observe/Delete related changes
Properly return OperationFuture from delete().
Ignore the cas values if set to zero.

Change-Id: I7f9b4a9149f1a952f5a2354f223223d02144da43
Reviewed-on: http://review.couchbase.org/19920
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
7e5d17d
Commits on Aug 22, 2012
@ingenthr ingenthr Updated spy dependency to 2.8.4-SNAPSHOT.
Change-Id: I27be57d44302248d27059b213a3dcc2364131a34
Reviewed-on: http://review.couchbase.org/19997
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
1840d0f
@ingenthr ingenthr Remove design docs without the _rev.
As of build 15xx, design documents no longer have a _rev and thus
there is no reason to retrieve them to remove them with _rev.

Technically speaking, we could probably get rid of this whole
section, but there's no harm in just making it work.

Change-Id: I6373dbab78ed7f3c02e57c2a4dcf734285b45ee8
Reviewed-on: http://review.couchbase.org/19998
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
0967d51
@ingenthr ingenthr Update spymemcached dependency to 2.8.4.
Change-Id: I3a92bb4efde4cda95fd8bd0b63976f6a76fd3da1
Reviewed-on: http://review.couchbase.org/20008
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
12dffd5
@ingenthr ingenthr Remove jettison import from ViewTest.
Change-Id: I72f49c842272ee06b39df38d6501aceaee7da7dc
Reviewed-on: http://review.couchbase.org/20010
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
4a5b5cb
Commits on Aug 31, 2012
@ingenthr ingenthr Update to spymemcached 2.8.5.
Change-Id: I754b08c9f1151bd739a89b8aeac3c0a4d102fa07
Reviewed-on: http://review.couchbase.org/20398
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
710f398
@ragsns ragsns Enhanced observe and added observe support for other mutation ops
Throw ObservedException, ObservedTimeoutException
and ObservedModifiedException
Added support for add, replace, cas
Updated Tests for observing the mutation operations

Change-Id: Ifa9accbe8056f28ecfefaac19a9d5bdf34fb9951
Reviewed-on: http://review.couchbase.org/20329
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
4b300b2
@ingenthr ingenthr Make observe poll loop parameters tuneable.
Change-Id: Iaf8c8a22119066d04869e30d657bde157a7f4dfd
Reviewed-on: http://review.couchbase.org/20399
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
21db5dd
Commits on Sep 09, 2012
@mikewied mikewied Remove unused variables in observe implementation
Change-Id: I38c8aaf59f1d01390e8f60bc96f21d6e4ede0881
Reviewed-on: http://review.couchbase.org/20654
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
2ec3bca
Commits on Sep 12, 2012
@ingenthr ingenthr Update to spy 2.8.6-SNAPSHOT for development.
Change-Id: Ie46913976b2a24197410cb7d57a6c35b5a76b3ed
Reviewed-on: http://review.couchbase.org/20711
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
49fe212
@ingenthr ingenthr JCBC-107: Correct OperationStatus message when observe poll is tuned.
Change-Id: Icf02c8d2f597a821869f77a79e38eb5cfb584a47
Reviewed-on: http://review.couchbase.org/20712
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
dd5e34e
@ingenthr ingenthr JCBC-109: Reduce observe poll interval latency.
A 100ms interval was chosen after some discussion.  It's
not optimal, and JCBC-108 tracks getting this to an adaptive
algorithm.

The reason for 100ms is that with real disks, chances are
fast IOs will happen in 60-120ms.  Only with caching or SSDs
will it likely be lower.  This means that with most checks
it'll happen in a handful of checks.

Change-Id: Ia6e14ee32ba6d6fc57608ffb44dbb9611e3401a5
Reviewed-on: http://review.couchbase.org/20760
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
f96138f
@ingenthr ingenthr Fix minor checkstyle issues.
Change-Id: I19ceb6459e61d0d5e53981267d6e58fcf99b784c
Reviewed-on: http://review.couchbase.org/20779
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
ce74eb6
@ingenthr ingenthr Update to released spymemcached 2.8.6.
Change-Id: I7803440f9ba5a88c3758fe10c49ab5c50532e0fd
Reviewed-on: http://review.couchbase.org/20780
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
e65942d
Commits on Sep 18, 2012
@ragsns ragsns Upgrade Netty Dependency
Fix for JCBC-106.
According to https://github.com/netty/netty/issues/milestones?state=open
3.5.5 is backwards compatible with earlier versions and is the latest
stable release. So far testing has proved that there are no
compatibility issues.

Conflicts:
	ivy/libraries.properties

Change-Id: I4b5ff9219d5709d45a7bcf7e5fdd9f7607b65184
Reviewed-on: http://review.couchbase.org/20889
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
e0e7d10
@mikewied mikewied Fix checkstyle errors
Change-Id: I3fe78fca9075b812b4369f5b99cc2d5556a0f065
Reviewed-on: http://review.couchbase.org/20917
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
455886d
@mikewied mikewied JCBC 110: Fix observe command
Change-Id: I70eb4947eb05cb4c356bab5ad14e7b277c00e7b8
Reviewed-on: http://review.couchbase.org/20847
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
5f50dbd
@mikewied mikewied Remove observe delete command
There is a server bug that pervents this change from working
properly in all cases. We will revert this change once the issue
is fixed on the server.

Change-Id: Ia9b4ea5e95dccd6f7083a996fb4cd66f471ba03a
Reviewed-on: http://review.couchbase.org/20918
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
f5603e2
@ragsns ragsns JCBC-40: Make paginator not return null.
It now no longer returns null.  It will also allow for easier
understanding of iterating between pages and records within
a page.  It will also now honor the setLimit on the supplied
Query.

Change-Id: Ib310bbe3cc4a9694426e78a31d9cbcc1daf70f05
Reviewed-on: http://review.couchbase.org/20898
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
4647b0a
@ragsns ragsns JCBC-25: Add option for on_error in conjunction with Views.
Fixes http://www.couchbase.com/issues/browse/JCBC-25

Change-Id: Ide9264bb8db5b6c3b1477e1d720aa289229ecfb8
Reviewed-on: http://review.couchbase.org/20878
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
59d1d5c
Commits on Sep 28, 2012
@mikewied mikewied Fail testOps in VBucketCouchbaseClientTest if connection fails
Fail test rather than log syserr in VBucketCouchbaseClientTest if
connection fails.

Change-Id: I252ea356300fbaa1fea0dd9b0b47f25bb8c6d0bd
Reviewed-on: http://review.couchbase.org/21156
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
a9420b6
@mikewied mikewied Don't increment volatile variables
Incrementing a volitile int is not thread safe since it follows
the read/modify/update pattern.

Change-Id: Ifa32c8867cc333ae722e74fedc345cdbd4e89e3d
Reviewed-on: http://review.couchbase.org/21157
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
1b1e13a
Commits on Oct 04, 2012
@mikewied mikewied Fix checkstyle errors
Change-Id: I9d2395e78d174f6e29e1bbad6df5a0744b2ecd29
Reviewed-on: http://review.couchbase.org/21351
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
7c39dee
@daschl daschl Changing Copyright Years and URL.
This small fix just updates copyright years and the couchbase
java sdk url.

Change-Id: I1b789b3b6b83ec1921f90e63768fcf25aaf9543d
Reviewed-on: http://review.couchbase.org/21219
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
58c1c9f
Commits on Oct 05, 2012
@daschl daschl Adding a ComplexKey class and tests for querying with arrays.
This changeset extends the capabilities of the ComplexKey
class, fixes a few issues and adds test cases for all
supported operations. It also adds docblocks where
appropriate.

Change-Id: I9e0e31179e08fa482f7615370798b7af254dfdc5
Reviewed-on: http://review.couchbase.org/21353
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
2178868
@daschl daschl Documentation improvements for the constructors.
Improving documentation for the constructors and making
it clear that - for the moment - different usernames and
bucketnames are not possible.

Change-Id: I9e130f05009a888031cad76a76dc1fcc0f7411dd
Reviewed-on: http://review.couchbase.org/21217
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
9633298
Commits on Oct 08, 2012
@daschl daschl Add more unit tests for the Query class
Change-Id: Ib9b863838eef8fb7e1f0d4a6f438a513edccae44
Reviewed-on: http://review.couchbase.org/21354
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
06a1940
@daschl daschl Remove the update_seq query parameter
Change-Id: I0e8d0a2096deeba981696f428df850e08e5f564d
Reviewed-on: http://review.couchbase.org/21355
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
4020091
@daschl daschl Add javadocs to public functions in Query class
Change-Id: Ia9ab7b631a0966fdc6326cf360c2707b12caaeae
Reviewed-on: http://review.couchbase.org/21356
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
340c13e
@mikewied mikewied JCBC-105: Add key stats operation
Change-Id: I5d5300ae29cdc7d73477a488b4554126325213bc
Reviewed-on: http://review.couchbase.org/21202
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
c73d7fa
Commits on Oct 09, 2012
@daschl daschl JCBC-120: Fix NPE on null for password
This changeset sets the password to an empty string if it is passed
in as null. This fixes a NPE exception down the stack in the spy
memcached library that tries to access it. This of course also sets
it for couchbase connections, but since an empty string is always
allowd it makes it more consistent.

Change-Id: Ic62558d2dbbef8e67f7570eb605207587718aec7
Reviewed-on: http://review.couchbase.org/21446
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
5d133ed
Commits on Oct 11, 2012
@daschl daschl JCBC-128: Allow replicateTo without persistTo
This changeset makes it possible to run mutation operations
like add,set,replace or cas only with replicateTo set and
persistTo to zero. This adds a security net to operations
that need to be fast but dont have to be persistet at the
same time.

Change-Id: Ic261eb027d39111d925a53271b36465349fdcd3b
Reviewed-on: http://review.couchbase.org/21416
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
325f213
@daschl daschl JCBC-129: Improve Documentation for PersistTo and ReplicateTo.
This changeset adds a bunch of docblocks describing the way how
the PersistTo and ReplicateTo argument work and what they may be
used for.

Change-Id: I38a9f24c26072e9e8bb9ea54d26c0442f29240df
Reviewed-on: http://review.couchbase.org/21417
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
5cfc13a
@daschl daschl JCBC-41: Allows better query options through ComplexKey.
Related Issues: JCBC-90, JCBC-48

This changeset provides more flexible options on how to provide
the query params, especially if someone wants to add numeric
strings and not want them to be casted to pure numbers. Since we
only allow Strings or ComplexKeys as params, the ComplexKey class
can be used to hint the correct type and enfore it down to the
HTTP query layer. See the added test cases for more details.

Change-Id: I0d56bda1d3d9727455bfe26fa7a1311dbcce00a8
Reviewed-on: http://review.couchbase.org/21337
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
0d75967
@daschl daschl Return correct result on hasPendingRequests.
This fixes a simple logic-bug which returns true when no pending
requests are in the queue.

Change-Id: Id917fa22ad3551b118ef0f3a3cbb8769a4cf999b
Reviewed-on: http://review.couchbase.org/21372
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
f6f0b25
@daschl daschl JCBC-126: Properly encode view values.
This changeset encodes all view property values so that they are
sent correctly over the wire. It encodes special characters like
spaces or brackets. This changeset also adapts the tests.

Change-Id: I347e4dce20181c0cd932a0d6d30e34f90475035d
Reviewed-on: http://review.couchbase.org/21423
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
b54d2ff
Commits on Oct 15, 2012
@daschl daschl JCBC-119: Allow NULL for persist/replicate.
This changeset adds the possibility of using null for persistTo
and/or replicateTo. It defaults to ZERO for both enums, which
are the defaults and are equal to "dont observe at all". Tests
are also attached.

Change-Id: I0d69c971792ad8118f5d9035ccf3e0d8bca0215b
Reviewed-on: http://review.couchbase.org/21421
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
00a2138
Commits on Oct 17, 2012
@daschl daschl JCBC-100: Add better error handling on view fetches.
This changeset adds better error handling for synchronous
view fetches (getView and getViews) and adds documentation
to the asynchronous methods to remind the developer that
he has to check on the future object himself.

Change-Id: Ic1a74310f1f789b7b83bfae09496526b27ee7247
Reviewed-on: http://review.couchbase.org/21338
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
0bc3d23
Commits on Oct 24, 2012
@daschl daschl Cancel view requests when the operation is cancelled.
This changeset makes sure that the corresponding http
requests are cancelled as well when the operatiion is
cancelled. This prevents a possible issue on blocking
the caller thread when the connection cant be
established.

Change-Id: I4c62eb8196a098ab5215e09659765fbd95010e1a
Reviewed-on: http://review.couchbase.org/21915
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
95c2575
@daschl daschl Renaming log message to remove CouchDB reference.
This changeset changes the log message to not refer to
CouchDB anymore but to a Couchbase HTTP connection
instead.

Change-Id: Idd21b8c6df2c50c3ce6616bf775c908ecc2c8d14
Reviewed-on: http://review.couchbase.org/21872
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
d94f3d9
@daschl daschl Prevent doctype clash in view test.
This changeset prevents the pagination tests to fail because
of recently added tests. It modifies the view function to only
emit the correct documents.

Change-Id: Ic0e809b070c75ce440402972588de578344d3258
Reviewed-on: http://review.couchbase.org/21827
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
d65f0bc
@daschl daschl Overriding spy tests to work correctly with couchbase
This changesets overrides two test cases that fail but
dont need to do so. They are overridden from spy because
the assertions are not correct with respect to couchbase
functionality.

Change-Id: I32c60869e1feb26345b29123fb0c22d0b6cc90f3
Reviewed-on: http://review.couchbase.org/21867
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
dee933a
@daschl daschl JCBC-100: [Backport] Add better error handling on view fetches.
This changeset adds better error handling for synchronous
view fetches (getView and getViews) and adds documentation
to the asynchronous methods to remind the developer that
he has to check on the future object himself.

Change-Id: Ic1a74310f1f789b7b83bfae09496526b27ee7247
Reviewed-on: http://review.couchbase.org/21338
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-on: http://review.couchbase.org/21738
eb439b7
@daschl daschl [Backport] Cancel view requests when the operation is cancelled.
This changeset makes sure that the corresponding http
requests are cancelled as well when the operation is
cancelled. This prevents a possible issue on blocking
the caller thread when the connection can't be
established.

This addresses JCBC-130.

Change-Id: I4c62eb8196a098ab5215e09659765fbd95010e1a
Reviewed-on: http://review.couchbase.org/21743
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
6876ee6
@daschl daschl Correcting view tests with wrong exception handling.
This changeset corrects the tests and makes sure the correct exceptions
are thrown. This is different than on master because the view tests
changed and the original changeset referred to those changes.

Change-Id: Id96b611105d7b3566eab2e6e3d81bb949c1a5ee3
Reviewed-on: http://review.couchbase.org/21924
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
f40b3f7
Commits on Oct 26, 2012
@daschl daschl JCBC-121: Dont use view connections for memcached
This changeset makes sure to only set/use the view connection while
connected to a couchbase bucket and not to a memcached bucket.

It also adds a test class with corresponding mocks to make sure
the initialization works correctly and does not fail on rebalance
or shutdown as well.

Change-Id: I912b134d43c7b145ece4e641a20d1fbc3a2c6d68
Reviewed-on: http://review.couchbase.org/21445
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
216af9b
Commits on Oct 29, 2012
@daschl daschl Updating spymemcached to the 2.8.8 release.
Change-Id: Idf77acb167a4f7d7729f6fddb913d926d439e60e
Reviewed-on: http://review.couchbase.org/22015
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
04607c3
Commits on Nov 01, 2012
@daschl daschl JCBC-130: Add a timeout for unresponsive http connection fetches.
This adds a hardcoded timeout and a test to make sure that after
a certain time it is guaranteed that the thread waiting for the
connection initialization returns eventually.

The timeout is set to 30 seconds. Note that this is not the
timeout for the actual view response to receive, but for the
connection initialization.

Change-Id: Icb1138803d7914853b4e0f69b5a8a0443e4170c0
Reviewed-on: http://review.couchbase.org/22206
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
b8eda75
Commits on Nov 06, 2012
@mikewied mikewied Fix checkstyle errors and remove unused variables
Change-Id: I5fda71dac640bb2f3ac2a88a49398c10438f6636
Reviewed-on: http://review.couchbase.org/22057
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
982a05b
@mikewied mikewied JCBC-64: Add bucket create and delete API's
This changeset adds the ability to create and delete buckets
through the ClusterManager class. This class is separate from
the CouchbaseClient class, because by definition the Client
operates on one bucket while the ClusterManager allows to
manage more than one at the same time.

Change-Id: Ia885d20aad1598b25d43e3a645ef51bdd68ff663
Reviewed-on: http://review.couchbase.org/20895
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
b5c2722
@daschl daschl Remove unused jmock dependency.
This changeset removes the unused JMock dependency, easymock is
used instead.

Change-Id: I7488fb0c7e20c82b691201875759e6a961ac4d13
Reviewed-on: http://review.couchbase.org/22109
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
c1eabf5
Commits on Nov 08, 2012
@daschl daschl JCBC-80: Adding a unit test for persist and no stale
This changeset adds an integration test for the persistence
requirements in combination with stale=false.

Change-Id: I6ed681ab7dbc0ff131ef3a0d271cfad43bdc539e
Reviewed-on: http://review.couchbase.org/21444
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
df5b6a5
@mikewied mikewied JCBC-122: Remove the TestAdmin and make tests more resilient
Bucket creation and deletion on the server can potentially take
a long time. This change makes these processes retry these
operations until they eirther timeout or complete. This change
also makes us wait until traffic is enabled on the server before
beginning our tests.

Change-Id: I87d5129763566cfc0293209b24f4031dc47cd405
Reviewed-on: http://review.couchbase.org/22058
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
b41f110
@daschl daschl JCBC-125: Don't cast every view document to string.
Casting every document to string causes problems when reading binary
objects like serialized objects through a view. It also includes
an updated ViewTest with a custom design doc that verifies such
situations.

Change-Id: I1267af20f5b6808935f0ce067c35229b9a16bb20
Reviewed-on: http://review.couchbase.org/21305
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
d70239e
@daschl daschl JCBC-94: Fixes possible thread issues on shutdown.
This changeset makes sure to wait for the view IO threads
to finish before returning to the shutdown method up the
stack.

Change-Id: Ic60fd610469e9254b31cdda204fe525997041327
Reviewed-on: http://review.couchbase.org/21301
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
f200708
Commits on Nov 09, 2012
@daschl daschl JCBC-58: Refactoring HttpFuture and ViewFuture
This changeset refactors the get() method for both the
HttpFuture and the ViewFuture to extract a common codepath
inside and reduce duplication.

Change-Id: I719dad0636cf3f2b0419335fbbe477033c335392
Reviewed-on: http://review.couchbase.org/22353
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
a0d9738
@daschl daschl JCBC-123: Throw an exception when vbucket master is -1
This changeset makes sure to throw a controlled exception when
vor the given vbucket there is no master server defined to handle
it appropriately. -1 for the master is clearly an invalid state
and could be the case for the following reason:

- No replicas are defined and a node is failed over.
- More nodes have been failed over than there are replicas.

Either way, the client library is unable to remedy the situation
on its on and therefore throws an exception. The application
layer is expected to deal with the situation (either retry until
a rebalance is done) or redirect it to a system which is capable
to do so.

Change-Id: I582939820ec3067ce724c93e410e93f834c340ee
Reviewed-on: http://review.couchbase.org/22352
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
66b8f32
Commits on Nov 15, 2012
@daschl daschl Ensure that include_docs is never passed as a HTTP param.
This test update ensures that the include_docs param is never
used in the HTTP param list.

Change-Id: I9915cdd0a1d67cbeebcc16d98d9c7b95a36e2867
Reviewed-on: http://review.couchbase.org/22505
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
aee9908
Commits on Nov 21, 2012
@daschl daschl JCBC-86: Remving HashAlgorithm fo Cache buckets
This changeset removes the unused hashAlgorithm code from the CachConfig
becaus it confuses and is not needed currently. The method is kept in there
because of interface compliance.

Change-Id: I8a44a958a96a67a203ffb4ffee3a03046f27676c
Reviewed-on: http://review.couchbase.org/22586
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
4974543
@daschl daschl JCBC-136: Adding support for spatial view queries.
This changeset adds the capabilities to query spatial views. Queries
work with and without documents, but not for reduce queries. The tests
have been refactored out to a new file for better encapsulation.

Change-Id: I96383e7f421c7e2d446f8d09724f0c707177552a
Reviewed-on: http://review.couchbase.org/22563
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
77d8bb9
@mikewied mikewied JCBC-142: Fix persist master issue with observe
Change-Id: I83368deaea04c0439822bdf825c472e0cdb88e87
Reviewed-on: http://review.couchbase.org/22692
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
33fffab
Commits on Nov 27, 2012
@mikewied mikewied JCBC-142: Fix observe test case
The observe test case was trying to observe that an item was
replicated and since we only have a single node cluster this
was causing all of the observe calls to fail.

Change-Id: I55f94e432e4095052dea668a015bfe8e04d77fe3
Reviewed-on: http://review.couchbase.org/22737
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
64b32be
@daschl daschl JCBC-40: Fix NPE on pagination iteration.
This changeset fixes a possible NPE when the view result does not have
more rows to return. It also moves the Pagination tests into a separate
file to make it easer to isolate possible issues.

Also, documentation has been added to the Paginatior class.

Change-Id: I560f22ac057d01cb72c3530fda15dfa08b5c9b5d
Reviewed-on: http://review.couchbase.org/22513
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
94fc174
@daschl daschl JCBC-153: Increase view timeout and make it configurable.
This changeset increases the view timeout from 60 to 75 seconds
and also makes it configurable through the connection factory.

Change-Id: I8b5dca7a32a352c51b27d9ee9cd10485652d4e3b
Reviewed-on: http://review.couchbase.org/22755
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
3a17616
@daschl daschl JCBC-150: Implicitly add reduce = true on reduced view
This changeset makes sure that when a reduced view is accessed and
no setReduce param was supplied, setReduce() is set to true to make
sure that appropriate view parsing codepath is used and no exceptions
are raised.

Change-Id: Ib2dfb5684428fe32bfdd654bef9947002bd5b1fb
Reviewed-on: http://review.couchbase.org/22710
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
d3e17b0
Commits on Nov 28, 2012
@daschl daschl JCBC-156: Fixing JavaDoc outdated params.
Change-Id: I0f13b45a5ed27f39df2eaf58733eb43c555bd2a8
Reviewed-on: http://review.couchbase.org/22877
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
ba4e3e2
@daschl daschl Adding debug output for jdk version on ant compile/test.
This changeset also gets rid of ant warnings and removes
some duplicated content.

Change-Id: Ie40fc881177dec0e37c92225d87dee7223df910e
Reviewed-on: http://review.couchbase.org/22845
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
e3313b1
Commits on Nov 29, 2012
@daschl daschl JCBC-152: Adding Test docs.
This changeset adds the test documentation and renames the README
file name to .md to be consistent and short.

Change-Id: I2398093cfed0e75436804a4b6fa4458f58d209bf
Reviewed-on: http://review.couchbase.org/22874
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
3663b5e
@daschl daschl JCBC-35: Don't compare vBuckets on MEMCACHE bucket reconfigs.
This changeset checks the bucket type before applying vbucket checks. This
prevents the problem of trying to compare vbuckets when there are none.

Change-Id: I7180e4347241064326542deca85240dbb18e9bdd
Reviewed-on: http://review.couchbase.org/22878
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
21fe279
@daschl daschl JCBC-155: Adding JavaDoc for *View.java files.
This changeset adds JavaDoc for AbstractView, SpatialView and View.
It is intended to clarify their usage and what they can be used for.

Change-Id: I62b9bda1eb4b006fa012be909cec92a66e3fafdc
Reviewed-on: http://review.couchbase.org/22872
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
328ea1e
@daschl daschl JCBC-63: Implementing Design Document Management
This changeset enables the creation and deletion of design
documents with appropriate views. It also adds tests for
the new functionality and allows the creation of spatial
views as well.

Change-Id: I51ff2e4306698a76b9481d7f23f0c887744baa16
Reviewed-on: http://review.couchbase.org/21380
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
46fd97e
Commits on Dec 03, 2012
@daschl daschl JCBC-158: add debug=true to query options.
This changeset adds the debug=true to the query options and also
prints the JSON response as a raw string to INFO when the debug
info is encountered.

Change-Id: Ic6c9f4f8f8551a110aae6052b8d1c08c216754e8
Reviewed-on: http://review.couchbase.org/22923
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
bb1c6ae
@daschl daschl JCBC-157: Really wait 10 seconds for the reconnect threshold.
This changeset fixes a typo that leads to unexpected behavior in the
reconnection threshold section of the connection factory.

Change-Id: I6d72b705d14a3ad1a8709ff2875d8fef430ce43b
Reviewed-on: http://review.couchbase.org/22902
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
aa077cf
@daschl daschl JCBC-148: check persistence against node count
This changeset verifies the persistence requirements against the
total node count and returns an exception if the requirements can
not be satisfied by the current cluster layout.

Note that this does NOT look at how much nodes are available for
a given key, this needs to be implemented as an enhancement.
The corresponding enhancement can be found at JCBC-161.

Change-Id: I531ad01b332a367256a8a1c6a0941b3683dede9e
Reviewed-on: http://review.couchbase.org/22936
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
32c1801
@ingenthr ingenthr JCBC-154: Merge special release 1.1c branch fixes in for release 1.1.
* gerrit/release11c:
  JCBC-130: Add a timeout for unresponsive http connection fetches.
  Correcting view tests with wrong exception handling.
  [Backport] Cancel view requests when the operation is cancelled.
  JCBC-100: [Backport] Add better error handling on view fetches.

Conflicts:
	src/main/java/com/couchbase/client/CouchbaseClient.java
	src/test/java/com/couchbase/client/ViewTest.java

Also, had to add a minor change to ViewNodeTest.java to add a view
since the NoDocsOperationImpl had changed.

Change-Id: I9a1ddd2b57c3a2d5e8801414ab72b4d435c7c5cb
0646755
@ingenthr ingenthr JCBC-160: Merge current release 1.0 branch fixes in for 1.1.
* gerrit/release10:
  JCBC-120: Fix NPE on null for password. Backport.
  JCBC-70: Fix Authentication to non-default bucket when connecting new node

Change-Id: I4a2db78d48f145be7e61d09a31c293f8365646eb
Reviewed-on: http://review.couchbase.org/22975
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
30390e5
@daschl daschl JCBC-147: Rename getViews to getDesignDocument
this changeset aligns the design document read method with the newly
added creation and deletion api methods.

WARNING: this is a API break!

Change-Id: Idbc5cba57cf9d7b8c34e1fed0f621d8c64772ebd
Reviewed-on: http://review.couchbase.org/22713
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
9749698
@ingenthr ingenthr JCBC-162: Re-enable delete with durability (observe).
This was removed while some server changes for responding
with CAS in the case of delete were merged into the 2.0
branch. Since that has been resolved, this feature should
be re-enabled.

This reverts commit f5603e2.

Conflicts:
	src/main/java/com/couchbase/client/CouchbaseClient.java
	src/test/java/com/couchbase/client/CouchbaseClientTest.java

Change-Id: Id9c195afdcd5253be6d590a481816a38065c98e1
Reviewed-on: http://review.couchbase.org/22998
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
c97ef0e
@daschl daschl Depend on spymemcached 2.8.9.
A change in spymemcached was made to allow keys to not be
restricted by ASCII protocol rules.  We'd like that change
here as well.  Note that the 250 character limit remains.

Change-Id: I0997aac25e97d88064d0f7a714cc92de4e3d4c4a
Reviewed-on: http://review.couchbase.org/23000
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
6b630b3