Update help text for hostnames

Change-Id: I9874f7f9e6d6d904aba3c5e639dd79908fe7ade8
Reviewed-on: http://review.couchbase.org/29172
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Remove pillowfight from NMakefile

Change-Id: I385e0315b4d5b5c3669b6a856bbab5cc11077cbe
Reviewed-on: http://review.couchbase.org/29205
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
IOCP: Fix casting of overlapped to writebuf

Change-Id: Ib39ca14eda1a4763a1d080fa74294f5dc0dfc323
Reviewed-on: http://review.couchbase.org/29281
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Bump up hardcoded CMake version

Change-Id: Ie74bdcd9e15a2047a560ea61635f9365f5180fe4
Reviewed-on: http://review.couchbase.org/29280
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-274 Handle getl/unl when purging the server

Thanks Robert Groenenberg

Change-Id: I4155d811314d22b513f42b50d9ce0b731353e7c1
Reviewed-on: http://review.couchbase.org/29344
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
CCBC-278: Use common config retry mechanism for bad configcache

- This uses the same error handling mechanism as when
  a bad configuration has been received from the network

- New LCB_CONFIG_CACHE_INVALID error code to notify the user of such a
  situation

Change-Id: Iecda5d4b2d4650613046ac82f6587fa8b65bedfb
Reviewed-on: http://review.couchbase.org/29454
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Use constant macro for config cache 'magic trailer'

Change-Id: I76c5d25f95006b61bd96dbe7f6de757506e1c6e6
Reviewed-on: http://review.couchbase.org/29456
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
CCBC-205: Stricter/More inspectable behavior for config cache

This provides a test and an additional lcb_cntl operation to check the
status of the configuration cache. Currently this is a boolean value. In
the case where a more complex status may be desired, a new lcb_cntl
command may be added.

Change-Id: I4d40d29363ee530438c9309aef9cdcbf99589d10
Reviewed-on: http://review.couchbase.org/29457
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Fixup cmake build

Change-Id: Ia63d702015fe58226cfe32afb24690cc52ba870c
Reviewed-on: http://review.couchbase.org/29632
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
CCBC-283 Apply key prefix in cbc-pillowfight

Change-Id: I0309fbd548ac3f94c4f9a750c63d547770c4ef4a
Reviewed-on: http://review.couchbase.org/29626
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Comment on buffer/packet relocation

Change-Id: Ic19065b5c43fb7074fc261365b5930103f3b9243
Reviewed-on: http://review.couchbase.org/29610
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Use temporary filename for configcache tests

If tests are run in parallel, there may be a race condition between two
instances.

Change-Id: I8f1e452588fd27f57ec2a40912f2907a42ea52d0
Reviewed-on: http://review.couchbase.org/29611
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-282: Make server buffers reentrant-safe

When purging implicit commands, we invoke callbacks which may in turn
cause other LCB entry points to be invoked which can shift the contents
and/or positions of the ringbuffers we're reading from. This patch is an
attempt at making an (efficient) copy of the necessary data so that we
can safely invoke callbacks without worrying about reentrancy issues.

Change-Id: Id844fbe5c237ec5851cfb4f62ed47f7a0f2c159d
Reviewed-on: http://review.couchbase.org/29608
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-279: lcb_wait() should always return success

Change-Id: I7d09a982c8a17efffcb618dc2e9704bb287ad5f1
Reviewed-on: http://review.couchbase.org/29458
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reset the server's buffers upon reconnection

This fixes a crash experienced when requesting a new read with the
previous buffer still in tact.

This was exposed by calling lcb_failout_server on a timeout error while
maintaining the same server struct. This path is only followed for
failed negotiations but is the only time in code where we re-create the
socket.

Change-Id: Iedaed57ddf689189cc597eea29165d861ed14c97
Reviewed-on: http://review.couchbase.org/29681
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-275: Do a full purge when negotiation times out

In this case we must purge the server from all commands and not simply
pop individual items. This is because we get odd behavior otherwise.

Added is a test developed with sweat and blood that reproduces the old
behavior where the client would crash.

Change-Id: Ib2c3724fde22d60388e0985a109aed8d66da9a51
Reviewed-on: http://review.couchbase.org/29671
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-243 Substitute isasl with cbsasl

cbsasl has implemented both PLAIN and CRAM-MD5 authentication
mechanisms

Change-Id: I7fcb19a59951a65f363bc66bd0375c67c2a0d468
Reviewed-on: http://review.couchbase.org/29627
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
CCBC-243 Handle SASL STEP and LIST_MECHS commands

CRAM-MD5 mechanism requires handlers for PROTOCOL_BINARY_CMD_SASL_STEP
and PROTOCOL_BINARY_CMD_SASL_LIST_MECHS

Change-Id: I117d751cff2b5ddf09f9a08d82b868a7b91e785a
Reviewed-on: http://review.couchbase.org/29628
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
bconf_provider: Skip all SASL commands on relocation

Change-Id: Id9ed94103945400314acbd33d1100ef8fb3a49c9
Reviewed-on: http://review.couchbase.org/29683
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
wait: return last_error iff not yet configured

Realized this when my Python tests started failing

Change-Id: I6bc6841d97af8e2ebc74b29de661be3c9ed53ba9
Reviewed-on: http://review.couchbase.org/29693
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>