Support libuv 0.8

Change-Id: I85a6a98e7e9a96756147e2f30b14d2e325898187
Reviewed-on: http://review.couchbase.org/28622
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-258: Set inside_handler on socket_connected

Previously we were always using SASL auth, and as such, we wouldn't
flush packets from the cmd_log using server_send_packets (which calls
apply_want). Apply_want shouldn't be called more than once per event
loop entry - so this sets and unsets the 'inside_handler' flag.

Change-Id: I137dcb8c18eafbee63b8a4f3861238d4f54c3bfe
Reviewed-on: http://review.couchbase.org/28612
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Render git revision in text to display easier

Change-Id: I598146d1c40bf0eb41ffe6cd02ed587c49327a91
Reviewed-on: http://review.couchbase.org/28640
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-258 explicitly check that the server initialized correctly

We must check return values from buffer allocator

Change-Id: Ibc4c6718c461b8c943c410270d2d6b03155c6e42
Reviewed-on: http://review.couchbase.org/28685
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Remove compile warning

The format specifier for 64 bit integers caused warning

Change-Id: Ia9dda08d0251cedbdfab3ab286ea430f35afe843
Reviewed-on: http://review.couchbase.org/28692
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Move logic with fallback to bucket name into lcb_create

We don't have to create 'bucket' member to carry the name of the
bucket. We can do it earlier

Change-Id: Ib7db0efd2bae4dcedff8aee3b51465ee7a495de4
Reviewed-on: http://review.couchbase.org/28700
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Do not allow to use Administrator account for LCB_TYPE_BUCKET

Change-Id: Id0c46c55f164d730879b08e72b6a0104b354dce8
Reviewed-on: http://review.couchbase.org/28698
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Do not use Administrator account in tests

Fixes tests after http://review.couchbase.org/28698

Depends-On: http://review.couchbase.org/28747
Change-Id: I13b1a991519073411ee0d8fff3092331dcba6022
Reviewed-on: http://review.couchbase.org/28748
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Make connect order deterministic

The current patch allows the user to toggle between deterministic
and random connect order for the bootstrap list.

Change-Id: Ie9476d5fd08be95e6a621c8e3d8ebfc4caa64853
Reviewed-on: http://review.couchbase.org/28689
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Use cluster type connection for cbc-bucket-flush

Although flush command is accessible for bucket type connections,
cbc-bucket-flush doesn't use provided bucket name to connect to,
therefore it will fail if the bucket name isn't "default".

Change-Id: I4751dbd1acecfeda2f5c819730f8daa4df43f3bb
Reviewed-on: http://review.couchbase.org/28755
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Prefer lcb_assert() to abort()

Change-Id: Ie824d6e75f24876e31a0eeede90a66d3a3380ccd
Reviewed-on: http://review.couchbase.org/28756
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
CCBC-263 Skip unfinished SASL commands on rebalance

During rebalance, it is possible that the newly added server doesn't
have chance to finish SASL auth before the cluster will push config
update, in this case packet relocator messing cookies.

Also the patch makes sure that SASL command/cookie isn't mixing with
other commands

Change-Id: Ic3fb01b4a39d2e8e68c690c264a2918d631d9602
Reviewed-on: http://review.couchbase.org/28744
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Update to recent CouchbaseMock.jar

Change-Id: Ie02798adc0ce129e1cd5eedb926681e78c1eb32e
Reviewed-on: http://review.couchbase.org/28771
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Update index man page

Change-Id: Ia7042a61fd2e833ea90c3efd7c552552584f7cd7
Reviewed-on: http://review.couchbase.org/28770
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-265 Do not try to parse config for LCB_TYPE_CLUSTER handles

It fixes timouts for management operations (like 'cbc bucket-create',
'cbc bucket-flush', 'cbc bucket-delete' and 'cbc admin')

Change-Id: I39cda0f6a46001a87fca4dae76c9949b693a1344
Reviewed-on: http://review.couchbase.org/28788
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Updated gtest to version 1.7.0.

Fixes issue with building with new XCode 5.0
version being released later this month.

Change-Id: I3561fbe2392770f0021defdc25cc1e7779e45420
Reviewed-on: http://review.couchbase.org/28871
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Update .gitignore rules to exclude gtest artifacts

Change-Id: I33e123b118a2bc02a20e515b035a38f8c447d55b
Reviewed-on: http://review.couchbase.org/28872
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Close config connection before trying next node

It will fix asserts in case of the config node becomes unresponsive,
and the threshold controlled by LCB_CNTL_CONFERRTHRESH and  lcb_cntl

Change-Id: If15cdc59278054798b778b908fb8ab422d8eebf5
Reviewed-on: http://review.couchbase.org/28873
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Randomize supplied nodes list by default

Change-Id: Ie65c0e76fa8601d9df28652206149dc47cddd4be
Reviewed-on: http://review.couchbase.org/28890
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Update metadata for 2.1.3 release

Change-Id: Ie3197ba60c12e306a5d5731d4082319366ff899d
Reviewed-on: http://review.couchbase.org/28881
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>