1# Release Notes
2
3## 2.10.3 (December 20 2018)
4
5* [CCBC-1008](https://issues.couchbase.com/browse/CCBC-1008): jsoncpp: use
6  `unique_ptr` instead of `auto_ptr`.
7
8* [CCBC-1011](https://issues.couchbase.com/browse/CCBC-1011): Port
9  vbucketkeygen tool to cbc-keygen. The tool generates list of keys, that
10  distributed over all vBuckets in the bucket.
11
12* [CCBC-1006](https://issues.couchbase.com/browse/CCBC-1006): Cleanup pending
13  queue of pipeline on retry
14
15* [CCBC-1007](https://issues.couchbase.com/browse/CCBC-1007): allow using
16  trusted store path without key file
17
18* [MB-31875](https://issues.couchbase.com/browse/MB-31875): cliopts: grow list
19  only if needed
20
21## 2.10.2 (November 23 2018)
22
23* Fixed incorrect header-guard for analytics.h, which might affect API
24  visibility (when included before `libcouchbase/n1ql.h`)
25
26## 2.10.1 (November 22 2018)
27
28* [CCBC-997](https://issues.couchbase.com/browse/CCBC-997): Extract analytics
29  queries into separate file, and expose new API as set of `lcb_analytics_*`
30  functions.
31
32* [CCBC-992](https://issues.couchbase.com/browse/CCBC-992): KV ingest mode for
33  analytics. Ingestion mode a way to funnel analytics results back into the KV
34  layer through mutation.
35
36* [CCBC-991](https://issues.couchbase.com/browse/CCBC-991): Analytics Deferred
37  Queries. Deferred queries allow to decouple the execution of an analytics
38  query from actually fetching the results. This is very important for queries
39  that take a long time to complete.
40
41* [CCBC-1004](https://issues.couchbase.com/browse/CCBC-1004): Fix request
42  counting for CAS-observe. Incorrect mapping server indexes during scheduling
43  observe requests might lead to crashes on multi-node clusters.
44
45* [CCBC-1005](https://issues.couchbase.com/browse/CCBC-1005): `select(2)`-based
46  IO plugin: always use expiration when using `lcb_tick_nowait` function to
47  avoid waiting for IO events.
48
49* Updates in testing infrastructure
50
51## 2.10.0 (October 18 2018)
52
53* [CCBC-982](https://issues.couchbase.com/browse/CCBC-982): Support analytics
54  for N1QL service in `lcb_ping3`.
55
56* [CCBC-989](https://issues.couchbase.com/browse/CCBC-989): Write bucket
57  capabilities into config cache, so that the client which was bootstrapped
58  from the cache will be able to reason about features availability (e.g. views).
59
60* [CCBC-987](https://issues.couchbase.com/browse/CCBC-987): Document tracing
61  options for cbc tools.
62
63* [CCBC-988](https://issues.couchbase.com/browse/CCBC-988): Update
64  cbc-pillowfight to work with by-id collections. It still does not use any
65  changes in protocol yet. The collection API will be exposed in 3.0 release.
66
67## 2.9.5 (September 21 2018)
68
69* [CCBC-980](https://issues.couchbase.com/browse/CCBC-980): Make idle timeout
70  for HTTP pool tunable
71
72* [CCBC-977](https://issues.couchbase.com/browse/CCBC-977): Update
73  documentation analytics. Add example demonstrating analytics queries
74
75* [CCBC-968](https://issues.couchbase.com/browse/CCBC-968): Improve log message
76  for `SELECT_BUCKET` on `EACCESS`. Add note saying that this error code might
77  be because of missing bucket.
78
79* [CCBC-976](https://issues.couchbase.com/browse/CCBC-976): Keep HTTP
80  connections pooled after `lcb_ping3`
81
82* [CCBC-975](https://issues.couchbase.com/browse/CCBC-975): Make sure kv
83  service is only enabled if in nodes list.
84
85* [CCBC-972](https://issues.couchbase.com/browse/CCBC-972): Fix memory issues
86  reported by valgrind
87
88* [CCBC-973](https://issues.couchbase.com/browse/CCBC-974): Correctly convert
89  non-null terminated tag buffers to `Json::Value`
90
91## 2.9.4 (August 29 2018)
92
93* [CCBC-970](https://issues.couchbase.com/browse/CCBC-970): Update list of retriable errors for
94  analytics
95
96* [CCBC-965](https://issues.couchbase.com/browse/CCBC-965): Update log level in config cache
97  provider
98
99* [CCBC-967](https://issues.couchbase.com/browse/CCBC-967): optimize Threshold Tracer queues/sorting
100
101* [CCBC-963](https://issues.couchbase.com/browse/CCBC-963): remove global state from random
102  generator, and make it thread-safe.
103
104* [CCBC-966](https://issues.couchbase.com/browse/CCBC-966): return current network for
105  LCB_CNTL_NETWORK
106
107* [CCBC-969](https://issues.couchbase.com/browse/CCBC-969): Allow to skip version from git tags
108
109* [CCBC-961](https://issues.couchbase.com/browse/CCBC-961): Add examples for FTS queries
110
111* [CCBC-971](https://issues.couchbase.com/browse/CCBC-971): disable dead socket detection for older
112  libuv (fixes build on platforms, where old libuv-dev package installed).
113
114* Report HELO features to logger in the single line.
115
116* Allow to select compression mode in connection string. This might be useful for debugging
117  purposes. For example, to bypass inflation step when receiving data.
118
119      $ CONNSTRING=couchbase://localhost/default?compression=deflate_only
120      $ cbc cat -U $CONNSTRING 00000000.json > bindoc.dat
121      00000000.json        CAS=0x15431f831dc60000, Flags=0x0, Size=739, Datatype=0x03(JSON,SNAPPY)
122
123## 2.9.3 (July 18 2018)
124
125* [CCBC-955](https://issues.couchbase.com/browse/CCBC-955): Parse uint32 as
126  unsigned ints instead of timeouts. Some settings were interpreted as time
127  values, while they should not (e.g. console_log_level, compression_min_size
128  etc). This issue forced the library to misinterpret user input (converter was
129  multiplying all values to 1000000, e.g. log level was always TRACE).
130
131* [CCBC-957](https://issues.couchbase.com/browse/CCBC-957): Automatically
132  disable SSL support, when OpenSSL is unavailable.
133
134* [CCBC-954](https://issues.couchbase.com/browse/CCBC-954): Define EFTYPE
135  error code if it does not exist. Fixes support of libuv 1.21 and higher.
136
137* [CCBC-951](https://issues.couchbase.com/browse/CCBC-951): Remove
138  experimental warning from subdoc API.
139
140* [CCBC-948](https://issues.couchbase.com/browse/CCBC-948): Consider retry
141  queue with only 0xb5 as empty. This allows a breakout from lcb_wait earlier
142  (when application operates in synchronous style). The old behavior, where
143  lcb_wait does not breakout until the library gets the first successful
144  configuration, still can be restored with `lcb_cntl(...,
145  LCB_CNTL_WAIT_FOR_CONFIG, ...)`.
146
147* [CCBC-939](https://issues.couchbase.com/browse/CCBC-939): Optimize
148  the performance of built-in tracer. It now uses sllist for tags container
149  instead of Json::Value.
150
151* [CCBC-958](https://issues.couchbase.com/browse/CCBC-958): Check tracing span
152  tags argument more pedantically and return error if arguments are not valid.
153
154* [CCBC-956](https://issues.couchbase.com/browse/CCBC-956): Combine operation
155  id and name into single field in the threshold tracer.
156
157* [CCBC-949](https://issues.couchbase.com/browse/CCBC-949): Do not hardcode
158  libevent dependencies in DEB packages. Instead let `dh_shlibdeps` script to
159  detect dependencies for each platform. This fixes a usless dependency on libevent-1
160  for ubuntu 18.04.
161
162* [CCBC-947](https://issues.couchbase.com/browse/CCBC-947): Fix build scripts
163for examples (when built with `-DLCB_BUILD_EXAMPLES=ON`).
164
165And other small fixes and improvements.
166
167## 2.9.2 (June 22 2018)
168
169* [CCBC-946](https://issues.couchbase.com/browse/CCBC-946): Restore broken ABI in 360ea68ef7738d543bbd3feac3f2c3c6c8ff976b
170
171## 2.9.1 (June 22 2018)
172
173* [CCBC-942](https://issues.couchbase.com/browse/CCBC-942): Expose new error
174  codes for subdocument operations.
175
176* [CCBC-866](https://issues.couchbase.com/browse/CCBC-866): Check cached
177  provider isn't NULL.
178
179* [CCBC-890](https://issues.couchbase.com/browse/CCBC-890): Always check if SSL
180  used when getting ports.
181
182* [CCBC-945](https://issues.couchbase.com/browse/CCBC-945): Allow to specify
183  logger in lcb_create().
184
185* [CCBC-935](https://issues.couchbase.com/browse/CCBC-935): Display orphan
186  tracer report on WARN log level.
187
188* [CCBC-936](https://issues.couchbase.com/browse/CCBC-936): Update default
189  tracing interval to 10 seconds.
190
191* [CCBC-937](https://issues.couchbase.com/browse/CCBC-937): Implement support
192  for alternate addresses.
193
194* [CCBC-943](https://issues.couchbase.com/browse/CCBC-943): Implement option to
195  dump TCP packets.
196
197  This change introduces new cmake option, which will force library to report
198  all incoming/outgoing TCP packets on TRACE log level. It renders the bytes
199  in Base64 encoding.
200
201  Also there is simple extraction tool, which beautifies packet traces, and
202  could be used like this:
203
204      cbc cat  -vvv foo bar 2>&1 | tools/extract-packets.rb
205
206## 2.9.0 (May 24 2018)
207
208This release is mostly about API visibility bump from uncommited to committed,
209but also includes several bug fixes.
210
211* [CCBC-930](https://issues.couchbase.com/browse/CCBC-930): Dump threshold
212  logging tracer queues before destroying the tracer.
213
214* Updates in crypto API as per RFC. This basically change of the API (ABI has
215  preserved compatible, but `v0` crypto API will return runtime error with 2.9.0
216  library. From this release, all encryption key management encapsulated into
217  crypto provider, so it does not need to expose key loader interface. In
218  addition, that user API is changed to conform RFC, and use noun `fields`
219  instead of `document` (e.g. `lcbcrypt_encrypt_fields`).
220
221* [CCBC-925](https://issues.couchbase.com/browse/CCBC-925): Fix existence checks
222  for registered crypto providers.
223
224* [CCBC-924](https://issues.couchbase.com/browse/CCBC-924): Initialize flag for
225  JSON server feature. Otherwise it might be left uninitialized and the library
226  will send JSON datatype to servers, which do not support it.
227
228* [PCBC-543](https://issues.couchbase.com/browse/PCBC-543), [CCBC-932](https://issues.couchbase.com/browse/CCBC-932), [CCBC-933](https://issues.couchbase.com/browse/CCBC-933): Update log levels
229
230## 2.8.7 (May 2 2018)
231
232* [CCBC-917](https://issues.couchbase.com/browse/CCBC-917): Add tracing for
233  observe. So now the library will group all CAS-observe operations, and in
234  general will nest observe operations under common parent when
235  `lcb_storedur3` API used.
236
237* [CCBC-918](https://issues.couchbase.com/browse/CCBC-918): Don't ping KV on
238  nodes without DATA service.
239
240* [CCBC-685](https://issues.couchbase.com/browse/CCBC-685): Implementation of
241  SCRAM-SHA{1,256,512} authentication mechanisms for KV service. Support for
242  SCRAM-SHA* SASL auth is disabled by default, because it is not portable, and
243  not every Couchbase service supports it. But if it is necessary, it could be
244  enabled using `lcb_cntl(..., LCB_CNTL_FORCE_SASL_MECH, ...)` operation, or
245  `"force_sasl_mech=SCRAM-SHA512"` option in connection string.
246
247* [CCBC-919](https://issues.couchbase.com/browse/CCBC-919): More granular
248  settings for compression. Now it is possible to specify minimum size of the
249  value to be considered for compression, and also the minimal ratio
250  `(compressed / original)`. See `LCB_CNTL_COMPRESSION_MIN_SIZE` (or
251  `"compression_min_size=100"` in bytes), and `LCB_CNTL_COMPRESSION_MIN_RATIO`
252  (or `"compression=0.9"`).
253
254* [CCBC-916](https://issues.couchbase.com/browse/CCBC-916): Do not set JSON
255  datatype if server didn't ack it. Fixes behavior where old server rejecting
256  commands as invalid when compression is enabled.
257
258* [CCBC-923](https://issues.couchbase.com/browse/CCBC-923): Allow to disable
259  fast-forward map for NMV handler. See `LCB_CNTL_VB_NOREMAP`
260  (`"vb_noremap=true"`). This option is disabled by default.
261
262Build improvements:
263
264* [CCBC-915](https://issues.couchbase.com/browse/CCBC-915): Fix builds
265  where DEBUG macro is defined
266
267* [CBD-2405](https://issues.couchbase.com/browse/CBD-2405): Change
268  target names in conflict with Server targets
269
270## 2.8.6 (April 5 2018)
271
272* [CCBC-888](https://issues.couchbase.com/browse/CCBC-888): Add threshold
273  logging tracer, which tracks and reports above threshold and orphaned operations.
274  This is beta functionality, which is disabled by default. To enable it, use
275  `enable_tracing=on` in the connection string.
276
277* [CCBC-910](https://issues.couchbase.com/browse/CCBC-910): Field encryption
278  API. The `lcbcrypto_*` functions abstracts encrypted field layout from actual
279  crypto implementations (OpenSSL, libsodium, etc.). The wrapper or application
280  using libcouchbase is expected to connect their own crypto and key providers, while
281  libcouchbase provides transformation of the encrypted data. See
282  sample crypto provider in [example/crypto](example/crypto).
283
284* [CCBC-904](https://issues.couchbase.com/browse/CCBC-904): Remove trailing
285  comma in `lcb_KVBUFTYPE` enum. Fixes build on some older
286  compilers.
287
288* [CCBC-907](https://issues.couchbase.com/browse/CCBC-907): cbc-n1qlback: Do
289  not require trailing empty line for input.
290
291* [CCBC-908](https://issues.couchbase.com/browse/CCBC-908): cbc-n1qlback:
292  Report number of loaded queries.
293
294* Add ability to write OPS/SEC from cbc-pillowfight to a file
295
296      cbc-pillowfight 2> /tmp/stats.txt
297
298  or, when writing to terminal required
299
300      cbc-pillowfight 2>&1 | tee /tmp/stats.txt
301
302* Build improvements for easier integration into with server manifest (and TLM project).
303
304## 2.8.5 (February 23 2018)
305
306* [CCBC-883](https://issues.couchbase.com/browse/CCBC-883): Always use built-in compression.
307  It is not possible to unbundle the Snappy library, as libcouchbase uses the C++ API which is not
308  exported in the headers. Also, compression can now work on all types of buffers, including
309  `LCB_KV_IOV` and `LCB_KV_IOVCOPY`. This fixes compression in `cbc-pillowfight` tool.
310
311* [CCBC-895](https://issues.couchbase.com/browse/CCBC-895): Fix typo in rendering IPv6 addresses
312  in `lcb_diag`.
313
314* [CCBC-879](https://issues.couchbase.com/browse/CCBC-879): Implement log redaction. When
315  `log_redaction=on` is specified in the connection string, the library will wrap sensitive
316  data in the logs in special tags, which can be processed by the
317  `cblogredaction` tool from the server distribution.
318
319* [CCBC-893](https://issues.couchbase.com/browse/CCBC-894): Updated list of subdoc error codes.
320
321* [CCBC-892](https://issues.couchbase.com/browse/CCBC-892): Enable the SSL trust store to be in
322  a separate file. Trust store has to be specified with option `truststorepath=…`, otherwise
323  the library will expect it to be stored with the certificate in `certpath=`.
324
325* [CCBC-888](https://issues.couchbase.com/browse/CCBC-888): Per operation tracing. When
326  compiled with tracing support (`cmake -DLCB_TRACING=ON`), the library will expose the tracing
327  API, which allows to measure time of every data operation, and include some extra information.
328  The API is modeled after OpenTracing and allows one to write custom tracers to consume this
329  information. For more information, see an example in
330  [example/tracing/tracing.c](example/tracing/tracing.c).  This is uncommitted API at this time.
331
332  Also this feature includes support for new type of the server responses, which include
333  time spent to execute the KV command on the server. This feature controlled by `enable_tracing`
334  option in connection string or `lcb_cntl(..., LCB_CNTL_ENABLE_TRACING, ...)`.
335
336* Added basic support of JSON datatype. The library will negotiate a mode, in which the
337  application will see `LCB_VALUE_F_JSON` flag on datatype field of the response in the
338  operation callback, if the cluster  detected the content of the document to be valid JSON.
339  Also the application can send this flag on the outgoing documents to notify the server
340  about payload format.
341
342* Refresh dtrace/systemtap integration. Also adds tapset for SystemTap to simplify access to
343  trace points.
344
345* cbc-pillowfight improvements and changes:
346  * dump diagnostics on `SIGQUIT` (CTRL-\ in terminal).
347  * with `-J`/`--json`, the JSON datatype will be sent on the documents.
348  * enable randomized document bodies with `-R`/`--random-body` switch.
349  * durability checks for pillowfight with `--persist-to`/`--replicate-to`.
350  * pessimistic locking of keys before updating with `--lock`.
351  * when requesting timings with `-T`/`--timings`, the application will no longer dump them
352    periodically.Instead it will await for the user to signal `SIGQUIT` and also dump
353    them on exit. The old mode of reporting regularly is enabled by repeating the switch more than
354    once (e.g. `-TT`).
355
356* Added the cbc-watch command to monitor server stats. By default it tracks `cmd_total_ops`,
357  `cmd_total_gets` and `cmd_total_sets` updating stats once a second, and displaying
358  diff with the previous value.
359
360
361## 2.8.4 (December 20 2017)
362
363* [CCBC-880](https://issues.couchbase.com/browse/CCBC-880): Implement x.509 client
364  certificate authentication. Connection string must use TLS-enabled scheme
365  (`couchbases://` or `https://`) and set options `certpath` and `keypath`. For example,
366
367        couchbases://127.0.0.1?certpath=/path/to/chain.pem&keypath=/path/to/client.key
368
369  Read more at server docs: https://developer.couchbase.com/documentation/server/5.0/security/security-x509certsintro.html
370
371* [CCBC-883](https://issues.couchbase.com/browse/CCBC-883): Revisit builtin compression
372  implementation (snappy). Add compression to cbc tools (see `--compress`, `-y` options).
373  Future versions of Couchbase Server will have end-to-end compression.
374
375* [CCBC-885](https://issues.couchbase.com/browse/CCBC-885): Do not skip HTTP Basic
376  authentication when password is empty.
377
378* [CCBC-876](https://issues.couchbase.com/browse/CCBC-876): Make sure that server
379  authority is always specified.  In some cases, when libcouchbase generates vbucket
380  configuration or data service is not available, the authority of the server might be
381  NULL.  This could cause issues, as we compare servers from configs using their authority
382  fields.
383
384* [CCBC-878](https://issues.couchbase.com/browse/CCBC-878): Support collections in
385  cbc-pillowfight.
386
387  Note that this change does not expose anything related to Collections API for
388  libcouchbase. It defines hidden switches for pillowfight tool to allow benchmark of
389  collections. The switches are not documented and might be removed in the future. Use
390  with care.
391
392  Generate only `beer:<seqno>` keys:
393
394        cbc pillowfight --separator : --collection beer
395
396  Using many --collection will alternate in generating `beer:<seqno>`, `brewery:<seqno>`
397  keys (default separator is ":"):
398
399        cbc pillowfight --collection beer --collection brewery
400
401* [CCBC-801](https://issues.couchbase.com/browse/CCBC-801): Expose information about
402  network IO for monitoring. The diagnostics exposed as string with encoded JSON object.
403
404        void diag_callback(lcb_t instance, int cbtype, const lcb_RESPBASE *rb)
405        {
406            const lcb_RESPDIAG *resp = (const lcb_RESPDIAG *)rb;
407            if (resp->rc != LCB_SUCCESS) {
408                fprintf(stderr, "failed: %s ", lcb_strerror(NULL, resp->rc));
409            } else {
410                if (resp->njson) {
411                    fprintf(stderr, "%.*s", (int)resp->njson, resp->json);
412                }
413            }
414        }
415
416        lcb_install_callback3(instance, LCB_CALLBACK_DIAG, diag_callback);
417        lcb_CMDDIAG cmd = { 0 };
418        lcb_diag(instance, NULL, &cmd);
419        lcb_wait(instance);
420
421* [CCBC-874](https://issues.couchbase.com/browse/CCBC-874): Dynamic authenticator. Note
422  that this feature should not be considered at public interface. To use it, application
423  have to define two callbacks, which will return username and password dependending on
424  bucket name and hostname/port of the endpoint.
425
426        std::map< std::string, std::string > credentials = {
427            {"protected", "secret"}
428        };
429        extern "C" {
430          static const char *get_username(void *cookie,
431                                          const char *host,
432                                          const char *port,
433                                          const char *bucket)
434          {
435              return bucket;
436          }
437
438          static const char *get_password(void *cookie,
439                                          const char *host,
440                                          const char *port,
441                                          const char *bucket)
442          {
443              std::map< std::string, std::string > *credentials =
444                  static_cast<std::map< std::string, std::string > *>(cookie);
445              return (*credentials)[bucket].c_str();
446          }
447        }
448
449
450   and later pass these callbacks to authenticator like this:
451
452
453        lcb_AUTHENTICATOR *auth = lcbauth_new();
454        lcbauth_set_callbacks(auth, &credentials, get_username, get_password);
455        lcbauth_set_mode(auth, LCBAUTH_MODE_DYNAMIC);
456        lcb_set_auth(instance, auth);
457
458* Include platform/compiler into client id, which included into HELLO and HTTP requests.
459
460* Fix parallel build on Linux when dtrace enabled
461
462* cbc-proxy: proxy N1QL, FTS and Analytics queries using STAT command.
463
464## 2.8.3 (November 21 2017)
465
466* [CCBC-415](https://issues.couchbase.com/browse/CCBC-415): Fixes in IPv6 support.
467  To use IPv6 addresses, the application should connect to IPv6-enabled Couchbase Server,
468  and explicitly switch on option via connection string `ipv6=allow` or `ipv6=only`,
469  where first variant permits the library to use both IPv6 and IPv4, and the second --
470  disables IPv4. Alternatively this setting controlled with `LCB_CNTL_IP6POLICY` and
471  `lcb_cntl`.
472
473* [CCBC-872](https://issues.couchbase.com/browse/CCBC-872): Metrics management
474  These metrics are intended at providing information on libcouchbase operations performed
475  over the lifetime of the current `lcb_t` instance (processed request packets, processed
476  response packets, request packets pending emission, server errors, server timeouts,
477  misrouted operations, retried operations).
478
479  Metrics collection is currently disabled by default. To enable metrics collection,
480  the user should call:
481
482        int activate = 1;
483        lcb_cntl(instance, LCB_CNTL_SET, LCB_CNTL_METRICS, &activate);
484
485  Access to the collected metrics is done using:
486
487        lcb_METRICS* my_metrics;
488        lcb_cntl(instance, LCB_CNTL_GET, LCB_CNTL_METRICS, &my_metrics);
489
490* [CCBC-870](https://issues.couchbase.com/browse/CCBC-870): Fix updating URL on retry. When retrying HTTP request, instead of replacing just `host:port` part of the old URL, the library inserted full URL.
491
492* [CCBC-547](https://issues.couchbase.com/browse/CCBC-547): Detect dead sockets under libuv.
493
494* Ensure macros safe by surrounding values with parentheses
495
496## 2.8.2 (October 17 2017)
497
498* [CCBC-833](https://issues.couchbase.com/browse/CCBC-833), [CCBC-834](https://issues.couchbase.com/browse/CCBC-834):
499  Update real cluster integration in the test suite.
500
501* [CCBC-860](https://issues.couchbase.com/browse/CCBC-860): cbc-connstr: Do not zero out C++ instances.
502
503* [CCBC-859](https://issues.couchbase.com/browse/CCBC-859): Fix libm shared object detection on Debian 9.
504
505* Bugs reported by [clang analyzer](http://clang-analyzer.llvm.org/):
506
507  * [CCBC-858](https://issues.couchbase.com/browse/CCBC-858): Fix memory leak for compressed packet.
508  * [CCBC-857](https://issues.couchbase.com/browse/CCBC-857): Fix possible NULL pointer dereference in `mcreq_reserve_key`.
509  * [CCBC-856](https://issues.couchbase.com/browse/CCBC-856): Initialize response struct in `H_config`.
510  * [CCBC-855](https://issues.couchbase.com/browse/CCBC-855): Fix dead assignments in `contrib/genhash`.
511  * [CCBC-854](https://issues.couchbase.com/browse/CCBC-854): Init vbguess array before entry lookup.
512  * [CCBC-853](https://issues.couchbase.com/browse/CCBC-853): cbc-proxy: do not use client object after free.
513  * [CCBC-852](https://issues.couchbase.com/browse/CCBC-852): Do not free memory twice in N1QL index manager.
514
515## 2.8.1 (September 20 2017)
516
517* Check nodes number for durability checks. The store with durability
518  requirements will report more specific error when the library cannot
519  fulfill the condition during failover.
520  * Issues: [CCBC-817](https://issues.couchbase.com/browse/CCBC-817)
521
522* Handle enhanced error messages for subdoc operations. The subdoc
523  responses will now expose context and reference ID if present.
524  * Issues: [CCBC-846](https://issues.couchbase.com/browse/CCBC-846)
525
526* Discover and bootstrap analytics service from cluster configuration.
527  * Issues: [CCBC-840](https://issues.couchbase.com/browse/CCBC-840)
528
529* Improve documentation of configuration parameters.
530  * Issues: [CCBC-835](https://issues.couchbase.com/browse/CCBC-835)
531
532* Enable Error Map feature by default.
533  * Issues: [CCBC-838](https://issues.couchbase.com/browse/CCBC-838)
534
535* Cleanup and extend `minimal`, `libeventdirect`, `instancepool` examples
536
537* Tools:
538  * improve error reporting
539  * experimental subcommand `cbc-proxy`
540  * fix memory leaks
541  * retry store operations during population phase in `cbc-pillowfight`
542
543## 2.8.0 (August 31 2017)
544
545* Add support for OpenSSL-1.1.
546  * Issues: [CCBC-814](https://issues.couchbase.com/browse/CCBC-814)
547
548* Mask `LOCKED` status code for backward compatibility. This code
549  (as well as others possible codes with 'item-locked' attribute)
550  replaced with `LCB_KEY_EEXISTS` for `SET`, `REPLACE` and `DELETE`
551  operations, and with `LCB_ETMPFAIL` for the rest.
552  * Issues: [CCBC-832](https://issues.couchbase.com/browse/CCBC-832)
553
554* Stop enumerating bootstrap nodes and mechanisms when the server
555  returns authentication error.
556  * Issues: [CCBC-825](https://issues.couchbase.com/browse/CCBC-825)
557
558* Fixed double free error with `lcb_ping3`.
559  * Issues: [CCBC-826](https://issues.couchbase.com/browse/CCBC-826)
560
561* Exposed additional N1QL query parameters: `lcb_n1p_readonly`,
562  `lcb_n1p_scancap`, `lcb_n1p_pipelinecap`.
563  * Issues: [CCBC-823](https://issues.couchbase.com/browse/CCBC-823)
564
565* Fixed `cbc-subdoc/upsert` without XATTR.
566  * Issues: [CCBC-823](https://issues.couchbase.com/browse/CCBC-823)
567
568* XERROR attributes synchronized with recent list on server.
569  * Issues: [CCBC-828](https://issues.couchbase.com/browse/CCBC-828)
570
571* Add missing documentation, and update stability of the API.
572  * Issues:
573  [CCBC-830](https://issues.couchbase.com/browse/CCBC-830),
574  [CCBC-831](https://issues.couchbase.com/browse/CCBC-831),
575  [CCBC-827](https://issues.couchbase.com/browse/CCBC-827)
576
577* Do not throttle background configuration polling by throttle interval
578  of configuration error handler.
579  * Issues: [CCBC-829](https://issues.couchbase.com/browse/CCBC-829)
580
581* Turn on background polling by default. The library will try
582  to schedule configuration update every 2.5 seconds. To disable it
583  use `config_poll_interval=0`.
584  * Issues: [CCBC-836](https://issues.couchbase.com/browse/CCBC-836)
585
586## 2.7.7 (August 17 2017)
587
588* Implement new function `lcb_ping3`, which sends NOOP-like message to
589  each service in the cluster and allows to measure latency along with
590  health status of the connection. Might be useful for application-side
591  keep-alive mechanisms.
592  * Issues: [CCBC-801](https://issues.couchbase.com/browse/CCBC-801)
593
594* Detect and expose bucket type through `LCB_CNTL_BUCKETTYPE`:
595
596        lcb_BTYPE type;
597        lcb_cntl(instance, LCB_CNTL_GET, LCB_CNTL_BUCKETTYPE, &type);
598
599  * Issues: [CCBC-790](https://issues.couchbase.com/browse/CCBC-790)
600
601* Fixed setting expiration in subdoc mutations.
602  * Issues: [CCBC-799](https://issues.couchbase.com/browse/CCBC-816)
603
604* Fixed DNS SRV support of Fedora 26 and FreeBSD.
605  * Issues: [CCBC-816](https://issues.couchbase.com/browse/CCBC-816)
606
607* Fixed DNS SRV with SSL connections.
608  * Issues: [CCBC-794](https://issues.couchbase.com/browse/CCBC-794)
609
610* Define EREMOTEIO in libuv
611  * Issues: [CCBC-812](https://issues.couchbase.com/browse/CCBC-812)
612
613* New subdocument command to remove whole document
614  * Issues: [CCBC-811](https://issues.couchbase.com/browse/CCBC-811)
615
616* New cbc command: `cbc-subdoc`. It provides interactive shell, where
617  all subdocument commands accessible to inspect and modify documents
618  in the cluster.
619
620* New cbc command: `cbc-ping`. It sends NOOP-like messages to all accessible
621  services in the cluster, and displays the status along with latency.
622  * Issues: [CCBC-801](https://issues.couchbase.com/browse/CCBC-801)
623
624* Fix `cbc-cat --replica`, which now allows reading documents from replicas.
625  * Issues: [CCBC-820](https://issues.couchbase.com/browse/CCBC-820)
626
627* Implement NOOP command and `cbc-pillowfight --noop`, which sends NOOP
628  instead of data manipulation commands.
629  * Issues: [CCBC-801](https://issues.couchbase.com/browse/CCBC-801)
630
631* Clarify errors found in `.cbcrc`. Now it will display configuration path
632  along with error message.
633  * Issues: [CCBC-759](https://issues.couchbase.com/browse/CCBC-759]
634
635* Update examples:
636  * Support username/password in subdoc and libeventdirect examples
637  * Added example for subdoc XATTRs
638
639* Integrate fix for parallel build with dtrace on FreeBSD
640  https://github.com/freebsd/freebsd-ports/commit/a71e1a86b851d42cd08319d9b28a4424e508e216
641
642* Make enhanced errors API public
643  * Issues: [CCBC-803](https://issues.couchbase.com/browse/CCBC-803)
644
645* Fixed various compiler and cppcheck warnings and documentation update.
646
647## 2.7.6 (July 11 2017)
648
649* Expose enhanced errors for data commands. Couchbase Server 5 might return
650  additional information about errors in the response body. According to
651  SDK-RFC-28, the library allow user code to inspect this information using
652  following functions:
653
654    * `lcb_resp_get_error_context(int, const lcb_RESPBASE *)`
655    * `lcb_resp_get_error_ref(int, const lcb_RESPBASE *)`
656
657  They both return non-NULL strings if any of error information accessible.
658  The lifetime of these fields limited by lifetime of the response object.
659  * Issues: [CCBC-781](https://issues.couchbase.com/browse/CCBC-781)
660
661* Report contextualized error messages during negotiation. The event reference
662  could be used to find more details about authentication errors in the server
663  logs.
664  * Issues: [CCBC-780](https://issues.couchbase.com/browse/CCBC-780)
665
666* Specify correct protocol level for `SO_KEEPALIVE`. This fixes setting
667  `tcp_keepalive` option on connections.
668  * Issues: [CCBC-798](https://issues.couchbase.com/browse/CCBC-798)
669
670* Implement Error Map Retries. This implements the mechanics needed to retry
671  commands on various errors based on dynamic settings supplied via the error map.
672  * Issues: [CCBC-783](https://issues.couchbase.com/browse/CCBC-783)
673
674* Add cluster admin provider. This provider doesn't do anything except serve
675  as a source of management hostnames. And the library will fall back to it
676  when bucket is not specified for cluster management connections.
677  * Issues: [CCBC-797](https://issues.couchbase.com/browse/CCBC-797)
678
679* Implement RBAC user management in cbc tools. In addition to `examples/users`,
680  this can be a demonstration of new security APIs which appear in Couchbase
681  Server 5.
682  * Issues: [CCBC-757](https://issues.couchbase.com/browse/CCBC-757)
683
684* Allow to inspect query errors in `cbc-n1qlback`. The command will write
685  details for failed queries to file, specified with option `--error-log`.
686
687* Fix memory leak in io::Pool
688  * Issues: [CCBC-791](https://issues.couchbase.com/browse/CCBC-791)
689
690* Fix `LCB_SDCMD_GET_FULLDOC`. This would not actually work beforehand
691  because the opcode it's mapped to is 0, and we used 0 as a sentinel
692  value for an invalid opcode within the subdoc implementation.
693  * Issues: [CCBC-792](https://issues.couchbase.com/browse/CCBC-792)
694
695* Add LCB_NOT_AUTHORIZED error code. This error code maps to
696  Memcached's EACCESS
697
698* Don't send empty Authorization header for HTTP requests, If there's
699  no username and/or password
700  * Issues: [CCBC-789](https://issues.couchbase.com/browse/CCBC-789)
701
702* Internal refactoring:
703  - `io::Pool` - remove empty dtor
704  - Fix `BadPluginEnvironment` test on Fedora where libm.so is ld script
705  - Add missing commands for `cbc-help`
706
707* Documentation update:
708  - Add additional documentation for `lcb_n1ql_cancel()`
709  - Typos
710
711## 2.7.5 (May 17 2017)
712
713* Allow to disable sending the `HELLO` command when connecting to a server.
714  Sending `HELLO` will cause a bootstrap failure with Couchbase Server 2.0 and
715  older.
716  * Issues: [CCBC-786](https://issues.couchbase.com/browse/CCBC-786)
717
718* Fix error return value on reprepared query.
719  Previously an error was returned if a N1QL query was reprepared, because
720  the prior internal failure status was not updated.
721  * Issues: [CCBC-782](https://issues.couchbase.com/browse/CCBC-782)
722
723* Check for more N1QL error strings indicating the need to reprepare a statement.
724
725* Fix uninitialized memory issue when initializing `lcb::Server` and `mc_PIPELINE`
726
727* Couchbase 5.0 additions for Subdocument.
728  This adds new protocol extensions for Couchbase 5.0. This consists of:
729  * New `LCB_SDCMD_SET_FULLDOC` and `LCB_SDCMD_GET_FULLDOC` for full-doucument
730    gets and sets via the subdoc API. This allows to access xattrs atomically
731    with the document body.
732  * New 'document flags'. These are in the form of `LCB_CMDSUBDOC_F_`.
733  * Issues: [CCBC-774](https://issues.couchbase.com/browse/CCBC-774)
734
735* Fix bug where CCCP subsystem would be suspended indefinitely.
736  CCCP subsystem would hang if an error was received for the config request
737  itself.
738  * Issues: [CCBC-779](https://issues.couchbase.com/browse/CCBC-779)
739
740* Fix bootstrap with `LCB_TYPE_CLUSTER`. Previously bootstrap would fail because
741  the client would not send proper credentials. Note that at this point, the
742  `default` bucket must still exist.
743  * Issues: [CCBC-778](https://issues.couchbase.com/browse/CCBC-778)
744
745* Ignore empty DNS SRV replies.
746  Some buggy DNS configurations return positive replies to SRV queries, but
747  without actually containing any kind of A record as a response.
748  * Issues: [CCBC-776](https://issues.couchbase.com/browse/CCBC-776)
749
750* Enable background polling for configuration changes.
751  This allows the client to periodically poll for configuration changes. This
752  feature is disabled by default. You can use the `config_poll_interval`
753  setting to enable it in the connection string.
754  * Issues: [CCBC-627](https://issues.couchbase.com/browse/CCBC-627)
755
756* Enable TCP Keepalive for newly created sockets.
757  Newly created sockets have TCP keepalive enabled in order to avoid firewalls
758  breaking connections due to inactivity. TCP Keepalive does not yet work for
759  the libuv plugin (e.g. nodejs).
760  You can use the `tcp_keepalive=false` directive in the connection string
761  to disable it.
762  * Issues: [CCBC-690](https://issues.couchbase.com/browse/CCBC-690)
763
764## 2.7.4 (April 18 2017)
765
766* Send `SELECT_BUCKET` command by default if server supports it. This enables
767  new-style 'RBAC' authentication by default. In 2.7.3 users were required to
768  use `select_bucket=true` in the connection string to enable this feature.
769  In this version, the option is still available but is now mainly useful to
770  disable it.
771
772* Improve `lcb_AUTHENTICATOR` API. This provides better documentation and some
773  API/design/implementation fixes to the authenticator interface. The
774  authenticator may be useful for integrators/wrappers who wish to correlate
775  multiple credentials with their buckets.
776  Note that the use of `lcb_AUTHENTICATOR` is *not* required for RBAC support.
777  In order to use RBAC, simply make use of the `username` field in
778  the `lcb_create_st` struct, or the `username` parameter in the connection
779  string.
780  * Issues: [CCBC-751](https://issues.couchbase.com/browse/CCBC-751)
781
782* Fix bug where `lcb_get_server_list()` would return NULL.
783  * Issues: [CCBC-764](https://issues.couchbase.com/browse/CCBC-764)
784
785* Fix bug where client would not recover from failover. Clients from version
786  2.7.1 through 2.7.3 would not obtain a new cluster map after a node had
787  been failed over (e.g. by hitting the "fail over" button in the UI).
788  * Issues: [CCBC-761](https://issues.couchbase.com/browse/CCBC-761)
789
790## 2.7.3 (March 21 2017)
791
792* Provide the ability to send the `SELECT_BUCKET` when establishing a
793  to a server. This is a building block allowing us to use 'RBAC'/username
794  auth in the future.
795  Note that this requires the `select_bucket=true` option in the connection
796  string or equivalent, and that this feature as a whole is considered
797  experimental.
798  * Priority: Major
799  * Issues: [CCBC-758](https://issues.couchbase.com/browse/CCBC-758)
800
801* Provide an option to disable DNS-SRV lookups. Because DNS SRV lookups often
802  result in no result (i.e. `NXDOMAIN`) - which takes longer, allowing to
803  disable such lookups may speed up startup time.
804  This option is available via the connection string, using `dnssrv=off`
805  * Priority: Minor
806  * Issues: [CCBC-756](https://issues.couchbase.com/browse/CCBC-756)
807
808* Send client/user-specific identifier in `User-Agent` HTTP header.
809  The library already does this for data nodes (Memcached). Using it in HTTP
810  services allows better supportability when diagnosing issues by reading the
811  HTTP logs.
812  * Priority: Major
813  * Issues: [CCBC-755](https://issues.couchbase.com/browse/CCBC-755)
814
815* Fix bug where DNS SRV hostnames would not be used.
816  While DNS SRV lookup was working, the library would not actually attempt
817  bootstrap off those received hostnames.
818  * Priority: Major
819  * Issues: [CCBC-753](https://issues.couchbase.com/browse/CCBC-753)
820
821* Provide experimental Analytics support.
822  This allows access to the Couchbase Analytics Service, available in
823  some pre-release builds. API and syntax wise, Analytics is very similar
824  to N1QL.
825  To use the analytics service, set the `LCB_CMDN1QL_F_CBASQUERY` bit in
826  `lcb_CMDN1QL::cmdflags`, and provide the appropriate _host:port_ combination
827  in the `lcb_CMDN1QL::host` field. - Currently, analytics support is not
828  used in the cluster map/configuration.
829  * Priority: Major
830  * Issues: [CCBC-734](https://issues.couchbase.com/browse/CCBC-734)
831
832## 2.7.2 (February 21 2017)
833
834This release consists of additional internal refactoring and some improved
835logging messages. There is enhanced experimental XATTR support. This release
836also contains some bug fixes:
837
838* Fix build issues on FreeBSD. This allows normal BSD `make` to be used, rather
839  than forcing `gmake`
840
841* Fixed broken JIRA link in README
842
843* Fix hanging SSL connections in IOCP/Completion mode. This would sometimes
844  stall the connection by not requesting a write if a read was in progress.
845  This would result in the command not being sent and the client hanging.
846  Note that this only affects completion-style I/O plugins such as IOCP and
847  libuv.
848  * Issues: [CCBC-744](https://issues.couchbase.com/browse/CCBC-744)
849
850* Rename `LCB_SDSPEC_F_VIRTPATH` to `LCB_SDSPEC_F_MACROVALUES`. `VIRTPATH`
851  is intended for possible future materialized XATTRs.
852
853* Add `LCB_SDSPEC_F_XATTR_DELETED_OK`, which maps to the protocol flag of
854  roughly the same name.
855
856## 2.7.1 (January 19 2017)
857
858This release consists of additional internal refactoring. More internals have
859been converted to C++.
860
861* Provide XATTR (Extended Attribute) prototype support.
862  This provides a prototype implementation of xattrs, allowing the client to
863  access extended (hidden) attributes of a document. This feature can be used
864  on the client side by simply setting the `LCB_SDSPEC_F_XATTRPATH` bit in
865  the `lcb_SDSPEC::options` field.
866  * Issues: [CCBC-728](https://issues.couchbase.com/browse/CCBC-728)
867
868* Add automatic DNS SRV record lookup when simple hostname supplied.
869  The library will now automatically attempt to look up SRV records
870  for various couchbase services if only one host is present in the
871  connection string. Automatic lookup will not be performed if more
872  than a single host is provded. See the [Java Documentation](https://developer.couchbase.com/documentation/server/current/sdk/java/managing-connections.html)
873  on the matter (go to the bottom of the page).
874  * Issues: [CCBC-566](https://issues.couchbase.com/browse/CCBC-566)
875
876## 2.7.0 (December 21 2016)
877
878This release consists mainly of internal refactoring. Many of the internals
879have been 'upgraded' to C++
880
881## 2.6.4 (November 28 2016)
882
883* Fix bug in pillowfight where large value sizes would cause a segfault.
884  * Issues: [CCBC-727](https://issues.couchbase.com/browse/CCBC-727)
885
886* Allow 64 bit values with `cbc-incr` and `cbc-decr`.
887  * Issues: [CCBC-716](https://issues.couchbase.com/browse/CCBC-716)
888
889* Fix encoding in `lcb_n1p_setconsistent_token`. This function would encode
890  it as `scan_vector` but it should be `scan_vectors`.
891
892* Refactor negotiation internals to use C++.
893  This is part of an internal refactoring to move our internals over to C++.
894  This will make the code more manageable and extendable in the future.
895
896## 2.6.3 (September 27 2016)
897
898* Fix memory corruption for some JSON APIs when no rows are returned.
899  This fixes a bug where the JSON parser would read from garbage memory when
900  parsing a response that had no rows, but due to a slow network, would be
901  received in multiple chunks.
902  This affects N1QL, CBFT, and View APIs.
903  * Priority: Major
904  * Issues: [CCBC-721](https://issues.couchbase.com/browse/CCBC-721)
905
906* Allow to adjust bytes to read per event loop iteration.
907  This allows applications with high network throughput but low CPU capacity
908  to prevent the library from oversaturating a specific event callback invocation
909  or starve other sockets. It may be controlled through the `read_chunk_size`
910  connection string option or via `lcb_cntl_string`.
911  * Priority: Major
912  * Issues: [CCBC-568](https://issues.couchbase.com/browse/CCBC-568)
913
914* Use `htonll` for CAS values.
915  This allows a consistent representation of CAS values regardless of underlying
916  platform. This allows interoperability between other SDKs with respect to
917  exchanging CAS values. This however may break interoperability with older
918  versions of the same SDK, if the CAS value is being passed around (which it
919  shouldn't be).
920
921* New subdocument additions.
922  This adds the `LCB_SUBDOC_F_MKDOCUMENT` flag which allows document creation
923  if the document does not exist, and can be used for mutation operations which
924  may create new paths or values. The `LCB_SUBDOC_CMD_GET_COUNT` is also added,
925  which is a new command which retrieves the number of elements (for an array)
926  or key-value items (within an object/dictionary) of a given path.
927  Both these features require Couchbase Server 4.6 (or its prereleases).
928  * Priority: Major
929  * Issues: [CCBC-718](https://issues.couchbase.com/browse/CCBC-718)
930
931## 2.6.2 (July 26 2016)
932
933* Don't crash on high number of FDs with select plugin. Because `select(2)`
934  can only accomodate up to a certain number of file descriptors in the
935  application, if opening a socket results in a too-high-numbered FD, the
936  plugin will return an error rather than silently failing during polling.
937  * Priority: Major
938  * Issues: [CCBC-567](https://issues.couchbase.com/browse/CCBC-567)
939
940* Pillowfight can now set ttl (expiry). This is done via the `-e` or `--expiry`
941  option.
942  * Priority: Major
943  * Issues: [CCBC-637](https://issues.couchbase.com/browse/CCBC-637)
944
945* Log URLs of HTTP requests. This may make it easier to debug some HTTP-based
946  APIs. The URLs are printed as part of the `TRACE` logging level.
947  * Priority: Major
948  * Issues: [CCBC-641](https://issues.couchbase.com/browse/CCBC-641)
949
950* Fix crash on shutdown with completion-based I/O. The crash was a result
951  of dereferencing the `lcb_t` after it had been destroyed. This bug affected
952  completion-based I/O subsystems such as libuv and IOCP.
953  * Priority: Major
954  * Issues: [CCBC-707](https://issues.couchbase.com/browse/CCBC-707)
955
956* Do not require `operation` field to be set on `lcb_CMDSTORE`.
957  Starting from this version, a new `lcb_storage_t` constant, `LCB_UPSERT`
958  has been added with a value of 0. This means that upsert operations no
959  longer need to explicitly use `LCB_SET`, it being the default.
960  * Priority: Major
961  * Issues: [CCBC-545](https://issues.couchbase.com/browse/CCBC-545)
962
963## 2.6.1 (June 21 2016)
964
965* Index management API now properly handles 'fields' field. Previously this
966  was treated as a csv string, when it is in fact a JSON array.
967
968* `pillowfight` now has a `--populate-only` option, which is useful when simply
969  trying to populate buckets with large amounts of data.
970
971* Allow to bypass OpenSSL initialization. This allows applications which already
972  have OpenSSL intialization code in place to suppress libcouchbase's own
973  OpenSSL initialization code. You can disable SSL initialization by using
974  `ssl=no_global_init` in the connection string.
975
976* Allow to toggle sending of multiple credentials in N1QL queries.
977  You can use the `LCB_CMD_F_MULTIAUTH` in the `lcb_CMDN1QL::cmdflags` field
978  to indicate that multiple credentials should be added. Otherwise only the
979  current bucket's credentials will be sent.
980
981* Fix infinite loop on completion (UV,nodejs,IOCP) type IO plugins.
982  This bug would be triggered when only a single server remained in the cluster
983  and that single server failed. This would result in the client never being
984  able to perform operations due to a delayed reference count decrement.
985  * Priority: Major
986  * Issues: [CCBC-704](https://issues.couchbase.com/browse/CCBC-704)
987
988## 2.6.0 (May 17 2016)
989
990* Improve index management API and implementation. The `rawjson` field was
991  being ignored and the `condition` field was missing as well.
992
993* Add pillowfight support for subdoc. At the simplest level you can simply
994  invoke pillowfight as `cbc-pillowfight --subdoc --json <other args>`.
995  Refer to the pillowfight documentation for more details.
996
997## 2.5.8 (April 19 2016)
998
999* Fix SSL connectivity errors with views and HTTP bootstrapping.
1000  This would cause network connectivity issues when attempting to bootstrap
1001  via `https://` or using views (`lcb_view_query()`). The fix is a workaround
1002  to not advertise older SSL encryption methods.
1003  * Priority: Major
1004  * Issues: [CCBC-688](https://issues.couchbase.com/browse/CCBC-688)
1005
1006* Do not abort when receiving a memcached EINVAL response.
1007  While the client should never end up in a situation where it receives an
1008  `EINVAL` from the server, it should nevertheless not terminate the execution
1009  of the current process. This bug was introduced in 2.5.6
1010  * Issues: [CCBC-689](https://issues.couchbase.com/browse/CCBC-689)
1011
1012* Fix memory leak when using N1QL prepared statements.
1013  Prepared statements would never be freed, even when the client handle was
1014  destroyed (`lcb_destroy()`) causing a slight memory leak.
1015
1016* Append CRLF header after host header.
1017  This would sometimes result in odd HTTP headers being sent out.
1018  * Issues: [CCBC-694](https://issues.couchbase.com/browse/CCBC-694)
1019
1020* Experimental CBFT (Full-Text search API)
1021  This version adds a new fulltext api. The API is a row-based API similar
1022  to N1QL and MapReduce. See the `<libcouchbase/cbft.h>` header for more details.
1023  The API is experimental and subject to change.
1024  * Issues: [CCBC-638](https://issues.couchbase.com/browse/CCBC-638)
1025
1026* Allow additional client identifier for HELLO command.
1027  The SDK sends a version string to the server when doing initial negotiation.
1028  The server then uses this string in the context of any logging messages
1029  pertaining to that connection. In this version, a new setting has been added
1030  to allow 'user-defined' version strings to be appended to the logs. Note that
1031  this feature is intended only for use with wrapping SDKs such as Python, node.js
1032  and PHP so that their versions can be present in the log messages as well.
1033  This setting is exposed as a string control (in the connection string, or
1034  `lcb_cntl_string()` with the name of `client_string`.
1035  * Issues: [CCBC-693](https://issues.couchbase.com/browse/CCBC-693)
1036
1037* vBucket retry logic changes.
1038  The client will now retry at constant 100ms rate when receiving not-my-vbucket
1039  error replies from the server (adjustable using `retry_nmv_interval`).
1040  It will also only use fast-forward map to determine the new location for the
1041  vbucket, and will not use extended hueristics.
1042
1043  The most noteworthy user-visible change is the 100ms retry interval which
1044  will significantly decrease the network traffic used by the SDK
1045  during a rebalance.
1046
1047  To restore the pre-2.5.8 behavior (i.e. use extended heuristics and and
1048  exponential retry rate), specify `vb_noguess=false`.
1049  * Priority: Major
1050  * Issues: [CCBC-660](https://issues.couchbase.com/browse/CCBC-660)
1051
1052* Add interface for multi-bucket authentication.
1053  A new API has been added to modify and add additional bucket/password
1054  pairs in the library. This is done using `lcb_cntl` and the `LCB_CNTL_BUCKET_CRED`
1055  setting.
1056
1057  Note that this functionality is not yet used in N1QL queries due to
1058  [MB-16964](https://issues.couchbase.com/browse/MB-16964)
1059  * Priority: Minor
1060  * Issues: [CCBC-661](https://issues.couchbase.com/browse/CCBC-661)
1061
1062
1063## 2.5.7 (March 22 2016)
1064
1065* High-level index management operations.
1066  A volatile API for high level index management operations has been added to
1067  assist in common N1QL index operations such as creating the primary index
1068  and removing indexes.
1069  * Priority: Major
1070  * Issues: [CCBC-662](https://issues.couchbase.com/browse/CCBC-662)
1071
1072* Fix N1QL mutation token queries.
1073  This fixes some bugs in the previous implementation of the way mutation tokens
1074  were handled with `lcb_N1QLPARAMS`. The bugs and fixes only affect consumers
1075  of that API. Couchbase SDKs do not consume this API
1076  * Priority: Minor
1077  * Issues: [CCBC-658](https://issues.couchbase.com/browse/CCBC-658)
1078
1079* Throttle config request retries on empty NMVB responses.
1080  This changes the previous behavior where a new configuration would be
1081  retrieved _immediately_ upon a not-my-vbucket reply if a configuration
1082  was not included within the error reply itself. The new behavior is to
1083  request a delayed retry (i.e. subject to the default throttle settings)
1084  if the current configuration originated from the CCCP (Memcached) provider.
1085  * Priority: Major
1086  * Issues: [CCBC-681](https://issues.couchbase.com/browse/CCBC-681)
1087
1088* Rename `LCB_CLIENT_ETMPFAIL` to `LCB_CLIENT_ENOCONF`.
1089  This error code is returned only when there is no current client configuration.
1090  This error condition is _not_ temporary and is actually fatal; a result of
1091  an initial bootstrapping failure. Note that the older name is still valid
1092  in older code for compatibility purposes.
1093  * Priority: Minor
1094  * Issues: [CCBC-679](https://issues.couchbase.com/browse/CCBC-679)
1095
1096* Include PID in log messages on OS X.
1097  This makes the library logs (via `LCB_LOGLEVEL` etc.) easier to read on a
1098  mac. Previously this used to display only the thread ID, which was identical
1099  for multiple processes. Now the display reads as _pid/tid_, making it easier
1100  to read the logs in a multi-process environment.
1101  * Priority: Minor
1102  * Issues: [CCBC-677](https://issues.couchbase.com/browse/CCBC-677)
1103
1104
1105## 2.5.6 (February 18 2016)
1106
1107* Sub-Document API (_experimental_)
1108  The client-side sub-document API has been implemented. Sub-document is
1109  a feature which vastly reduces network usage when operating on parts
1110  of documents.
1111  The API as it appears in this version is highly experimental and may
1112  (and likely will) change. Examples of use can be found in the `examples/subdoc`
1113  directory.
1114  * Priority: Major
1115
1116* Make `lcb_sched_enter` and `lcb_sched_leave` optional.
1117  When scheduling an operation (e.g. `lcb_get3()`), the scheduling function
1118  will implicitly create a scheduling context and submit the operation if
1119  none exists already. A scheduling context is explicitly created by calling
1120  `lcb_sched_enter()` and finished by calling `lcb_sched_leave()` or
1121  `lcb_sched_fail()`.
1122  * Issues: [CCBC-664](https://issues.couchbase.com/browse/CCBC-664)
1123  * Priority: Major
1124
1125* API3 is now stable.
1126  The scheduling based API, introduced in version 2.4.0 and known as 'api3',
1127  is now stable and considered the API for use with the library.
1128  The previous API (i.e. 'api2') is considered deprecated.
1129
1130  While API3 has been promoted to stable in this version, it has been available
1131  in its current form (and in a mostly compatible manner, _except_ the implicit
1132  scheduling feature - CCBC-664) since 2.4.0.
1133
1134  Storing an item in API2:
1135
1136    lcb_get_store_t cmd = { 0 }, *cmd_p = &cmd;
1137    cmd.v.v0.key = "key";
1138    cmd.v.v0.nkey = 3;
1139    cmd.v.v0.bytes = "value";
1140    cmd.v.v0.nbytes = 5;
1141    cmd.v.v0.operation = LCB_SET;
1142    lcb_store(instance, NULL, 1, &cmd_p);
1143
1144  Storing an item in API3:
1145
1146    lcb_CMDSTORE cmd = { 0 };
1147    LCB_CMD_SET_KEY(&cmd, "key", 3);
1148    LCB_CMD_SET_VALUE(&cmd, "value", 5);
1149    cmd.operation - LCB_SET;
1150    lcb_store3(instance, NULL, &cmd);
1151
1152
1153* Add `libcouchbase/` string to version identification to Memcached
1154  Connections to memcached will now be identified as `libcouchbase/version`
1155  rather than `version`. This increases readability for server logs
1156  * Issues: [CCBC-656](https://issues.couchbase.com/browse/CCBC-656)
1157  * Priority: Minor
1158
1159* Hide `mutation_token` field from API3 mutation respones. The `mutation_token`
1160  field has never been part of the API itself (it was previously present when
1161  api3 was marked as "experimental").
1162  The mutation token for any operation must now be retrieved using the
1163  `lcb_resp_get_mutation_token()` to retrieve the actual mutation token.
1164  * Issues: [CCBC-671](https://issues.couchbase.com/browse/CCBC-671)
1165  * Priority: Minor
1166
1167* Server's `PROTOCOL_BINARY_RESPONSE_EINTERNAL` is no longer mapped to
1168  `LCB_EINTERNAL`. `LCB_UNKNOWN_MEMCACHED_ERROR` will be returned instead
1169
1170* Allow get-and-touch with an expiry of 0.
1171  Clearing a document's expiry with `get` is now possible, using the new
1172  `LCB_CMDGET_F_CLEAREXP` in `lcb_CMDGET::cmdflags`.
1173  * Issues: [CCBC-667](https://issues.couchbase.com/browse/CCBC-667)
1174  * Priority: Major
1175
1176* Allow multiple buckets when using sequence number consistency with N1QL
1177  This uses the new internal `scan_vector` protocol supporting multiple buckets,
1178  each providing their own `lcb_MUTATION_TOKEN` objects.
1179  * Issues: [CCBC-658](https://issues.couchbase.com/browse/CCBC-658)
1180  * Priority: Major
1181
1182## 2.5.5 (January 12 2016)
1183
1184* Add `retry_interval` string option to adjust retry interval.
1185  This allows the setting to be modified via `lcb_cntl_string()` and specified
1186  in the connection string.
1187  * Priority: Major
1188  * Issues: [CCBC-654](https://issues.couchbase.com/browse/CCBC-654)
1189
1190* Handle backslashes in view row ID fields.
1191  This would previously not be handled correctly as the backslashes would not
1192  be removed, for example an ID of `has_a_"quote` would appear in the API as
1193  `has_a_\"quote`. This has been fixed and document IDs are now properly
1194  processed as JSON
1195  * Priority: Major
1196  * Issues: [CCBC-649](https://issues.couchbase.com/browse/CCBC-649)
1197
1198* Allow 'file-only' configuration mode.
1199  This allows applications to make the library instance exclusively configured
1200  from a file on the local filesystem rather than through network bootstrap.
1201  This feature is undocumented and unsupported. It may be enabled using the
1202  `bootstrap_on=file_only` connection string directive.
1203  * Priority: Major
1204  * Issues: [CCBC-652](https://issues.couchbase.com/browse/CCBC-652)
1205
1206* Log when squashing network errors.
1207  This will make the library log the original error whenever a network error
1208  is translated from a more detailed description into `LCB_NETWORK_ERROR`
1209  (in case `detailed_errcodes` is not enabled), or if an OS-level error is
1210  found which cannot be translated into a more specific library error.
1211  * Priority: Major
1212
1213* Fix memcached/ketama hashing
1214  This fixes a bug in the ketama hasing code which caused a key to be mapped
1215  to an effectively arbitrary server for the library instance. In practice the
1216  node a key was mapped to depended on the order in which the hosts were
1217  specified in the connection string. This has been fixed to always use
1218  hashing based on the lexical sort order of each server node.
1219  It is highly recommended that applications upgrade to this version (2.5.5)
1220  for proper memcached (cache) bucket functionality.
1221  * Priority: Critical
1222  * Issues: [CCBC-653](https://issues.couchbase.com/browse/CCBC-653)
1223
1224* Add `cbc-touch` subcommand.
1225  This now allows the simple "touching", or modifying expiration time via the
1226  `cbc` command line client.
1227  * Priority: Major
1228  * Issues: [CCBC-651](https://issues.couchbase.com/browse/CCBC-651)
1229
1230
1231## 2.5.4 (November 25 2015)
1232
1233* Validate vBucket master nodes for bounds when receiving new configuration.
1234  This ensures that invalid configurations (addressing nodes which do not
1235  exist) do not make their way to KV routing operations.
1236  * Priority: Major
1237  * Issues: [CCBC-643](https://issues.couchbase.com/browse/CCBC-643)
1238
1239* Add `lcb_strcbtype` to print the name of the callback type
1240  This small convenience function is added to pretty-print the type
1241  of callback being invoked. The second argument to the callback can be passed
1242  to this function.
1243  * Priority: Minor
1244
1245* Disallow using `certpath` connection string option without explicit SSL
1246  (`couchbases://`) scheme. Since the SSL and non-SSL schemes are similar,
1247  a typo can let a user mistakenly think that SSL is being used. This is
1248  fixed by disallowing the other SSL option (`certpath`) when SSL is not
1249  enabled.
1250  * Priority: Minor
1251  * Issues: [CCBC-644](https://issues.couchbase.com/browse/CCBC-644)
1252
1253* Add convenience function to retrieve hostname for key.
1254  This is an alternative to retrieving the vBucket configuration (via `lcb_cntl()`)
1255  and mapping the key to an index, and mapping the index to a node. Note that
1256  hostnames are sufficient for most but not all configurations. Those running
1257  multiple server instances on the same host (for example, `cluster_run`) will
1258  still need to use the full set of steps as this function does not return a
1259  port. This function is provided both as a vBucket API (`lcbvb_get_hostname()`)
1260  which retrieves the hostname for an index as well as a top-level instance
1261  (`lcb_t`) function (`lcb_get_keynode()`) which accepts a key buffer and length.
1262  * Priority: Minor
1263
1264* Ensure embedded jsoncpp does not throw exceptions.
1265  This caused some build issues with other build systems. This has been fixed
1266  by replacing any exception throwing code with `abort()` and `assert()`
1267  statements.
1268  * Priority: Minor
1269  * Issues: [CCBC-634](https://issues.couchbase.com/browse/CCBC-634)
1270
1271* Log vBucket configuration parsing failures.
1272  This logs vBucket configuration parsing failures when a given config received
1273  could not be parsed. Parsing failures include both JSON syntax errors as well
1274  as improper fields or values within the config itself.
1275  * Priority: Major
1276  * Issues: [CCBC-647](https://issues.couchbase.com/browse/CCBC-647)
1277
1278* Allow per-request N1QL timeouts to exceed global timeouts.
1279  This scans the `"timeout"` property of the N1QL request and if set, will
1280  make the value of this property the timeout value for the request. A small
1281  parser was implemented which converted the N1QL timeout values (`s`, `h`, etc.)
1282  into microseconds.
1283  * Priority: Major
1284  * Issues: [CCBC-660](https://issues.couchbase.com/browse/CCBC-660)
1285
1286* Request configuration refresh when HTTP API redirects are received.
1287  Redirects in Couchbase Server are sent when a node is about to exit the
1288  cluster. We should take this as a sign to refresh the config since it indicates
1289  a node is about to be removed.
1290  * Priority: Major
1291  * Issues: [CCBC-646](https://issues.couchbase.com/browse/CCBC-646)
1292
1293
1294## 2.5.3 (August 27 2015)
1295
1296* Add N1QL timeout feature.
1297  This allows an independent timeout setting for N1QL. Previously this would
1298  use the views timeout.
1299  * Priority: Major
1300  * Issues: [CCBC-631](https://issues.couchbase.com/browse/CCBC-631)
1301
1302* Add N1QL prepared statements.
1303  This allows prepared statements to be used with N1QL. The library will
1304  maintain an internal "prepared statement cache" which contains cached
1305  responses for internal PREPARE requests. To use a prepared statement, an
1306  application can simply set the `LCB_CMDN1QL_F_PREPCACHE` bit in the
1307  `cmdflags` field within the `lcb_CMDN1QL` structure. All the rest is
1308  handled internally within the library.
1309  * Priority: Major
1310  * Issues: [CCBC-633](https://issues.couchbase.com/browse/CCBC-633)
1311
1312## 2.5.2 (July 23 2015)
1313
1314* Fix off-by-one error when populating documents with pillowfight.
1315  Previously pillowfight would only populate N-1 documents where N
1316  is the (`-I`, `--num-items`) option. This has been fixed.
1317  * Priority: Minor
1318
1319* Don't generate negative keys for pillowfight.
1320  For certain option configurations, pillowfight would generate negative keys
1321  (some keys were in the format of -nnnnnn).
1322  * Priority: Minor
1323
1324* Allow in-progress N1QL requests to be cancelled.
1325  This allows in-progress N1QL requests to be cancelled by adding a new API,
1326  `lcb_n1ql_cancel()`. Invoking this function on an `lcb_N1QLHANDLE` handle
1327  (obtained via an _out_ parameter in the command structure) will effectively
1328  stop the request and stop delivering callbacks to the user.
1329  * Priority: Major
1330  * Issues: [CCBC-619](https://issues.couchbase.com/browse/CCBC-619)
1331
1332* Rename `lcb_SYNCTOKEN` to `lcb_MUTATION_TOKEN`.
1333  This experimental (volatile) API has been renamed to "Mutation Token" to
1334  better reflect naming conventions found in other client libraries.
1335  * Priority: Minor
1336
1337* Implement histogram/timings information for N1QL queries via `cbc-n1qlback`.
1338  This adds support for the (`-T`, `--timings`) option in the
1339  `cbc-n1qlback` benchmark/stress-test utility. These timings reflect the
1340  latency between issuing the query and the receipt of the first row of the
1341  resultset.
1342  * Priority: Major
1343  * Issues: [CCBC-624](https://issues.couchbase.com/browse/CCBC-624)
1344
1345* Add (`-M`, `--mode`) option to `cbc-create` to allow for upsert, insert, etc.
1346  This allows `cbc-create` to use the full gamut of storage options available
1347  via the SDK by allowing an insert/upsert/replace mode as an argument to the
1348  new `--mode` option. `append` and `prepend` are now also provided as options,
1349  though not documented.
1350  * Priority: Major
1351  * Issues: [CCBC-625](https://issues.couchbase.com/browse/CCBC-625)
1352
1353* Support `CBC_CONFIG` environment variable for command line tools.
1354  This variable specifies a path to an alternate `cbcrc` file which may be
1355  used to provide cluster/bucket settings. This new option allows multiple
1356  configurations to coexist, without forcing any one of them to be inside the
1357  user's home directory.
1358  * Priority: Minor
1359  * Issues: [CCBC-626](https://issues.couchbase.com/browse/CCBC-626)
1360
1361
1362## 2.5.1 (June 17 2015)
1363
1364Bug fixes and improvements in 2.5.1
1365
1366* Fix hanging in durability operations if node is not present and constraints
1367  include failed node. This condition may be triggered when only a single node
1368  remains in the broadcast probe and a command sent to it could not be scheduled.
1369  A symptom of this bug was durability operations 'hanging'
1370  * Priority: Major
1371  * Issues: [CCBC-607](http://issues.couchbase.com/browse/CCBC-607)
1372
1373* Improved handling of topology changes when non-data (N1QL, Index) nodes are
1374  part of the cluster. This fixes some issues (mainly crashes) when non-data
1375  nodes are found inside the cluster during a topology change. While the library
1376  since version 2.4.8 was able to handle initial bootstrapping with non-data
1377  nodes, it would still crash when such nodes were encountered during
1378  configuration changes.
1379  * Priority: Major
1380  * Issues: [CCBC-609](http://issues.couchbase.com/browse/CCBC-609),
1381    [CCBC-612](http://issues.couchbase.com/browse/CCBC-612)
1382
1383* Improved random host selection algorithm for REST services
1384  This new algorithm ensures that the distribution is even among all _eligible_
1385  nodes for a given service. The old algorithm would only distribute evenly when
1386  the assumption that all nodes contained the same services were true. However
1387  this assumption is no longer necessarily true with Couchbase 4.0. In this case
1388  the algorithm ensures that the random selection inspects only the pool of
1389  nodes which are known to have a given service enabled.
1390  * Priority: Major
1391  * Issues: [CCBC-611](http://issues.couchbase.com/browse/CCBC-611)
1392
1393* Ensure ketama/Memcached-bucket hashing works correctly when non-data nodes
1394  are part of the cluster. In previous versions, ketama hashing would incorrectly
1395  consider all nodes as candidates for keys, which would result in some items
1396  being routed to non-data nodes, resulting in odd errors and inaccessible
1397  data. This is only an issue for the still-unreleased Couchbase 4.0.
1398  * Priority: Major
1399  * Issues: [CCBC-613](http://issues.couchbase.com/browse/CCBC-613)
1400
1401* Set `TCP_NODELAY` as a server side option, if it's enabled on the client.
1402  This uses the `HELLO` protocol functionality to enable this feature, if
1403  this feature is also enabled on the client (enabled by default).
1404
1405
1406New features in 2.5.1
1407
1408* Add `cmake/configure` option for enabling the embedding of the libevent
1409  plugin. This option, named `--enable-embedded-libevent-plugin`, will cause
1410  the plugin to be linked in with the core library (_libcouchbase_) rather
1411  than built as its own object
1412  * Priority: Minor
1413
1414* Add new combined "Store-with-durability" operation. This new API, called
1415  `lcb_storedur3()` allows specifying the storage input options as well as
1416  the associated durability options in a single command. Likewise, the status
1417  of the operation (including durability) is returned in the operation's
1418  callback.
1419  * Priority: Major
1420  * Issues: [CCBC-616](http://issues.couchbase.com/browse/CCBC-616)
1421
1422
1423## 2.5.0 (May 12 2015)
1424
1425This change in the major version number signals the addition of new features
1426for Couchbase Server 4.0; most of the actual new functionality for Couchbase
14274.0 has already been included (incrementally) in prior 2.4.x versions. The
1428new 2.5 version is built on the 2.4.x codebase.
1429
1430* Add `cbc-n1qlback` - a simple benchmark for N1QL queries. This functions
1431  by executing a line-delimited file containing query bodies using multiple
1432  threads if possible.
1433  * Priority: Major
1434  * Issues: [CCBC-604](http://issues.couchbase.com/browse/CCBC-604)
1435
1436* `TCP_NODELAY` functionality has now been placed into effect. This
1437  functionality was nominally present in prior versions, but would not work
1438  because of a typo.
1439  * Priority: Minor
1440
1441* Add 'tick' or 'pump' mode for I/O
1442  As an alternative to `lcb_wait()`, applications may call `lcb_tick_nowait()`
1443  to incrementally perform (non-blocking) I/O. This may provide a performance
1444  boost when batching/scheduling many operations. `lcb_wait()` itself must be
1445  called to guarantee completion of all operations, and the `lcb_tick_nowait()`
1446  functionality is only available on some I/O plugins. See the API docs for
1447  more information.
1448  * Priority: Major
1449  * Issues: [CCBC-598](http://issues.couchbase.com/browse/CCBC-598)
1450
1451* Allow "console logger" to log to a file
1452  As a convenience, it is now possible to direct the library to write to
1453  a log file rather than standard error. This is possible using the
1454  `LCB_CNTL_CONLOGGER_FP` (to programmatically set a `FILE*` value via
1455  `lcb_cntl()`) or `console_log_file` to set the path of the file (which
1456  will be overwritten) via `lcb_cntl_string()` or the connection string.
1457
1458* Make `lcb_N1QLPARAMS` repeatable/debuggable
1459  This allows the `lcb_n1p_mkcmd()` call to be invoked multiple times without
1460  actually modifying internal state. Previously calling this function twice
1461  would result in corruption of the internal parameter state. In this version,
1462  a new function, `lcb_n1p_encode()` has been added (which `lcb_n1p_mkcmd()`
1463  wraps) which may be used to inspect the encoded form of the query.
1464
1465## 2.4.9 (April 14 2015)
1466
1467* Disable HTTP provider when any CCCP config is received.
1468  This makes the assumption that CCCP will always be available if even a
1469  single node provides an HTTP configuration. This change may break some
1470  corner-case upgrade scenarios from version 2.2 to 2.5 where a newly added
1471  2.5 node is subsequently removed.
1472  * Priority: Major
1473  * Issues: [CCBC-526](http://issues.couchbase.com/browse/CCBC-526),
1474    [CCBC-589](http://issues.couchbase.com/browse/CCBC-589)
1475
1476* Fix additional missing defines for UV's `EAI_*` symbols
1477  This was not entirely fixed in 2.4.8, since some undefined macros still
1478  remained.
1479  * Priority: Major
1480  * Issues: [CCBC-596](http://issues.couchbase.com/browse/CCBC-596)
1481
1482* Make connection string timeout parameters (e.g. `operation_timeout`) always
1483  specify seconds; this will no longer require the decimal point to be used,
1484  but will break any prior usages of this value for microseconds.
1485  * Priority: Minor
1486  * Issues: [CCBC-597](http://issues.couchbase.com/browse/CCBC-597)
1487
1488* Add `cbc n1ql` subcommand, which executes N1QL queries.
1489  This subcommand is still a bit rough around the edges, mainly because of
1490  server-side support for "pretty=false" (which makes the rows display rather
1491  weirdly).
1492  * Priority: Major
1493  * Issues: [CCBC-595](http://issues.couchbase.com/browse/CCBC-595)
1494
1495* Allow usage of `-D` option in `cbc` and `cbc-pillowfight` tools.
1496  This flag allows specifying connection string options in a more
1497  concise form on the commandline. The `-D` option may be specified
1498  multiple times in the form of `-Doption=value`.
1499  * Priority: Minor
1500
1501* Interpret `couchbase://host:8091` connection string as `couchbase://host`
1502  Previously the library would treat `8091` as a memcached port. While technically
1503  correct according to the connection string semantics, would often be a
1504  source of confusion for users migrating from older versions of the library
1505  (or other SDKs) when using the form `http://host:8091`. A special provision
1506  is thus made for such a cas.
1507  * Priority: Major
1508  * Issues: [CCBC-599](http://issues.couchbase.com/browse/CCBC-599)
1509
1510* Implement enhanced durability using sequence numbers.
1511  This feature is available in Couchbase 4.0, and uses sequence numbers
1512  (optionally specified in the response packet of each mutation).
1513  sequence-based durability constraints help resolve some ambiguity in
1514  the case of checking the durability of items which have since been
1515  mutated, or in the case of a cluster failover. Using this functionality
1516  requires the `LCB_CNTL_FETCH_SYNCTOKENS` (or `fetch_synctokens`) and the
1517  `LCB_CNTL_DURABILITY_SYNCTOKENS` (or `dur_synctokens`)
1518  settings to be enabled (using `lcb_cntl()` or `lcb_cntl_string()`, or
1519  in the connection string). Enabling `LCB_CNTL_FETCH_SYNCTOKENS` will
1520  cause mutation response packets from the server to return an additional
1521  16 bytes of sequence data, and enabling `LCB_CNTL_DURABILITY_SYNCTOKENS`
1522  will cause `lcb_durability_poll()` to transparently use this information
1523  (rather than the CAS) to check for persistence/replication.
1524  **Only available in Couchbase 4.0**. As a result of this feature, much
1525  of the durability subsystem itself has been rewritten, making durability
1526  overall more performant, even for CAS-based durability.
1527  * Priority: Major
1528  * Issues: [CCBC-569](http://issues.couchbase.com/browse/CCBC-569)
1529
1530* Add `lcb_version_g` extern symbol as alternative to `lcb_get_version()`.
1531  This symbol is an extern global which allows simple runtime checking of
1532  the library version. This is more convenient than `lcb_get_version()` as
1533  it avoids the requirement to create a temporary variable on the stack
1534  (`lcb_get_version()` returns a string, and requires an `lcb_U32` pointer
1535  as its first argument to get the actual numeric version).
1536  * Priority: Minor
1537
1538
1539## 2.4.8 (Mar. 8 2015)
1540
1541* Retry next nodes on initial bootstrap, even if first node says bucket does
1542  not exist (or auth error), as this might be a recently removed node
1543  * Priority: Major
1544  * Issues: [CCBC-577](http://issues.couchbase.com/browse/CCBC-577)
1545
1546* The `cbc` and `cbc-pillowfight` binaries on Windows are now distributed
1547  in both _release_ and _debug_ variants. Previously they would be clobbered
1548  by one or the other depending on the build host. This fixes some issues in
1549  performance and dependency resolution when using these libraries.
1550  * Priority: Minor
1551  * Issues: [CCBC-581](http://issues.couchbase.com/browse/CCBC-581)
1552
1553* Provide Read-Only config cache mode. In this mode the configuration cache
1554  file is read but never updated. Additionally, a missing file in this mode
1555  results in a hard error.
1556  * Priority: Major
1557  * Issues: [CCBC-584](http://issues.couchbase.com/browse/CCBC-584)
1558
1559* Keep vBucket heuristic guesses for limited periods of time.
1560  This will allow previously-learned vBucket master locations to persist
1561  over a configuration change, providing these changes were discovered
1562  recently. This allows the reduction of not-my-vbucket responses while
1563  allowing new configs to overwrite our heuristic info, if the heuristic is
1564  too old.
1565  * Priority: Major
1566
1567* Fix potential crashes in get-with-replica (`lcb_rget3`, `lcb_get_replica`)
1568  when there are no replicas available, or if there is an error in retrieving
1569  from one of the replicas.
1570  * Priority: Major
1571  * Issues: [CCBC-586](http://issues.couchbase.com/browse/CCBC-586)
1572
1573* Do not wait between not-my-vbucket retries
1574  This behavior restores the pre 2.4.0 behavior of retrying not-my-vbucket
1575  responses, with a more intelligent retry/rotation algorithm (see the
1576  release note about "vbucket map heuristics"). Previously a wait-time
1577  was introduced because of potential busy loops in retrying to the same
1578  node. The `LCB_CNTL_RETRY_NMV_IMM` setting can be used to disable this
1579  functionality (by disabling it, i.e. setting it to 0). This may also be
1580  disabled in the connection string via `retry_nmv_imm=0`.
1581  * Priority: Major
1582  * Issues: [CCBC-588](http://issues.couchbase.com/browse/CCBC-588)
1583
1584* Fix compilation error with UV when `EAI_BADHINTS` is not defined in the
1585  system. This is primarily an issue with newer UV versions and some versions
1586  of Linux
1587  * Priority: Major
1588  * Issues: [CCBC-590](http://issues.couchbase.com/browse/CCBC-590)
1589
1590* Allow means to disable C++ behavior on public library structures, allowing
1591  them to be initialized via C-style static initializers.
1592  This allows the zeroing of structures such as `lcb_get_cmd_t cmd = { 0 }`,
1593  which would ordinarily fail under C++ compilation because of that structure
1594  having a defined C++ constructor. Applications can take advantage of this
1595  feature by defining the `LCB_NO_DEPR_CXX_CTORS` preprocessor macro when
1596  compiling.
1597  * Priority: Major
1598  * Issues: [CCBC-591](http://issues.couchbase.com/browse/CCBC-591)
1599
1600* Fix some bugs in timing behavior (`lcb_enable_timings`). Timings between
1601  1000-2000ms are now reported accurately. Additionally for more common
1602  handling, second timing ranges (between 1-9s) are reported in ms range
1603  (i.e. timings of 4 seconds are reported as 3000-4000ms ).
1604  * Priority: Minor
1605  * Issues: [CCBC-582](http://issues.couchbase.com/browse/CCBC-582)
1606
1607
1608## 2.4.7 (Feb. 17 2015)
1609
1610* Fix SSL connection failures with `SSL_UNDEFINED_CONST_FUNCTION`.
1611  This would sometimes cause failures during early connection/negotiation
1612  stages.
1613  * Priority: Major
1614  * Issues: [CCBC-571](http://issues.couchbase.com/browse/CCBC-571)
1615
1616* Add _experimental_ support for N1QL queries.
1617  This adds support for contacting N1QL endpoints and retrieving their
1618  result sets. The support at both the client and server components is
1619  still a work in progress.
1620  The API is similar to the view api (see `lcb_view_query()`) added in
1621  version 2.4.6. See details in `<libcouchbase/n1ql.h>`
1622  * Priority: Major
1623  * Issues: [CCBC-572](http://issues.couchbase.com/browse/CCBC-572)
1624
1625* Add _experimental_ support for geospatial view queries.
1626  GeoSpatial views are available as an experimental feature in the
1627  current releases of the server. This will soon be offered as a
1628  stable feature in future releases.
1629  Applications may now use the `lcb_RESPVIEWQUERY::geometry` field
1630  and the `LCB_CMDVIEWQUERY_F_SPATIAL` to utilize geospatial views.
1631  * Priority: Major
1632  * Issues: [CCBC-573](http://issues.couchbase.com/browse/CCBC-573)
1633
1634* Fix memory leak for retried commands.
1635  In cases where a given command needs to be retried more than once, a
1636  memory leak was fixed in which the previous instance of the pacekt was
1637  not properly freed.
1638  * Priority: Major
1639  * Issues: [CCBC-574](http://issues.couchbase.com/browse/CCBC-574)
1640
1641## 2.4.6 (January 20 2015)
1642
1643* Fix floating point exception on OS X.
1644  A floating point exception would sometimes be thrown on OS X sytems due
1645  to bad time structure initialization. The installation provided with
1646  homebrew for 2.4.5 fixed this issue. This is completely fixed in 2.4.6
1647  Priority: Major
1648
1649* Improve warning messages when using deprecated options in `cbc`.
1650  This provides less ambiguous help messages when using deprecated options,
1651  showing a full and complete example for proper usage (when possible).
1652  * Priority: Minor
1653  * Issues: [CCBC-562](http://issues.couchbase.com/browse/CCBC-562)
1654
1655* Add patch/micro version to DLL information on Windows.
1656  This lets the user see the exact version of the library on windows (via
1657  right clicking on the DLL and inspecting the details). Previously this
1658  information contained only the major and minor versions.
1659  * Priority: Minor
1660  * Issues: [CCBC-563](http://issues.couchbase.com/browse/CCBC-563)
1661
1662* Provide _pkgconfig_ (`.pc`) file with installation.
1663  This may help third party applications and libraries link against libcouchbase
1664  in some environments.
1665
1666* Provide one-off `unsafe_optimize` option for connection string/`lcb_cntl`.
1667  This provides a shorter way to enable some potentially unsafe optimizations
1668  which may make the client perform better in some scenarios.
1669  * Priority: Minor
1670
1671* Allow prompting for password in `cbc`.
1672  The `cbc` and `cbc-pillowfight` utilities will now securely prompt for the
1673  password if the password specified on the commandline is a hyphen (`-`).
1674  * Priority: Minor
1675  * Issues: [CCBC-565](http://issues.couchbase.com/browse/CCBC-565)
1676
1677* Fix timeouts in some durability when not all replicas are online.
1678  The library will now fail the operation with `LCB_DURABILITY_ETOOMANY`
1679  rather than allowing the operation to timeout.
1680  * Priority: Major
1681  * Issues: [CCBC-560](http://issues.couchbase.com/browse/CCBC-560)
1682
1683* Add high level row-based view functionality.
1684  This adds a new API (currently considered _volatile_) which allows
1685  intelligently querying views. This builds atop the basic HTTP
1686  interface, and exposes a row-based callback API based upon
1687  streaming JSON parsing. The new API is defined in `<libcouchbase/views.h>`.
1688  This API will become more stable over time.
1689  * Priority: Major
1690  * Issues: [CCBC-100](http://issues.couchbase.com/browse/CCBC-100)
1691
1692* Parse configuration service locations for experimental services
1693  This exposes the N1QL and indexing services via the _lcbvb_ API. See
1694  `libcouchbase/vbucket.h` for more information.
1695
1696## 2.4.5 (December 17 2014)
1697
1698* Fix `pillowfight` ignoring `set-ratio` values above 50
1699  The program would ignore these values and act as if 100 was specified,
1700  thus never issuing any GET operations
1701  * Priority: Minor
1702  * Issues: [CCBC-550](http://couchbase.com/issues/browse/CCBC-550)
1703
1704* Building with autotools is no longer supported.
1705  If building the library from source, you _must_ use
1706  [CMake](http://cmake.org/download) version 2.8.9 or greater. If unfamiliar
1707  with CMake, the README describes the process. Included also is a top-level
1708  script called `configure.pl` which functions with an autoconf-like interface.
1709  * Priority: Major
1710
1711* Fix customized IOPS crashes in some usage cases
1712  This fixes scenarios where applications assume that the built-in IOPS version
1713  is 0, and attempt to "Subclass" the IOPS structure. The internal version of
1714  the library structure is now 3, with some extra heuristics in place to ensure
1715  that the older code will still function.
1716  This issue was most visible in the Python SDK when using the gevent or Twisted
1717  plugins.
1718  This issue was first introduced with version 2.4.4
1719  * Priority: Critical
1720  * Issues: [CCBC-557](http://couchbase.com/issues/browse/CCBC-557)
1721
1722* Allow raw `certpath` to be passed without need for percent-encoding (in most cases)
1723  This allows for a common pattern fo passing `certpath` in the connection string as
1724  a raw, unencoded path. This allows a user to do
1725  `couchbases://host/bucket?certpath=/foo/bar/baz`.
1726
1727* Fix missing installation UV plugin headers and source
1728  In 2.4.4 this was accidentally left out, and would only be installed if the plugin
1729  itself was built and installed. This affected building the Node.JS SDK using an
1730  existing libcouchbase install.
1731  * Priority: Major
1732  * Issues: [CCBC-558](http://couchbase.com/issues/browse/CCBC-558)
1733
1734## 2.4.4 (Nov. 19 2014)
1735
1736* Detect disconnected pooled sockets
1737  This allows the connection pool to detect dead sockets which were closed
1738  by a server when they were idle. Sometimes servers will close connections
1739  to open idle sockets to save resources, or because of bugs in their
1740  implementations.
1741  This will fix some issues experienced with views where queries would
1742  randomly fail with `LCB_NETWORK_ERROR` or `LCB_ESOCKSHUTDOWN`, by first
1743  checking if the socket is alive before returning it back to the library's
1744  core.
1745  Note that the `libuv` plugin does not implement this functionality yet.
1746  * Priority: Critical
1747  * Issues: [CCBC-546](http://couchbase.com/issues/browse/CCBC-546)
1748
1749* Fix _pillowfight_ `--min-size` bug
1750  This fixes a bug where pillowfight would sometimes compare the `min-size`
1751  option to an uninitialized `max-size` option and round it down to that
1752  value; then would set the `max-size` option.
1753  * Priority: Major
1754  * Issues: [CCBC-542](http://couchbase.com/issues/browse/CCBC-542)
1755
1756* Don't ignore `LCB_CNTL_DURABILITY_INTERVAL`
1757  Fix a bug where this interval would be ignored, if modified by the user; always
1758  reverting to 100ms.
1759  * Priority: Major
1760  * Issues: [CCBC-543](http://couchbase.com/issues/browse/CCBC-543)
1761
1762* Fix memory leak with HTTP requests using a request body
1763  Requests (such as `PUT`, `POST`, etc) which contained a request body
1764  would cause a memory leak as the library forgot to free them when the
1765  request object was destroyed.
1766  * Priority: Major
1767  * Issues: [CCBC-538](http://couchbase.com/issues/browse/CCBC-538)
1768
1769* Fix errneous `LCB_SUCCESS` return when passed duplicate keys to
1770  `lcb_durability_poll()`. This would cause applications to mistakenly wait
1771  for a callback to arrive, when in fact the command had failed.
1772  * Priority: Major
1773  * Issues: [CCBC-536](http://couchbase.com/issues/browse/CCBC-535)
1774
1775* Add option to preserve vbucket ownership heuristics across config updates
1776  This allows the learned configuration settings to persist between configuration
1777  updates. The default behavior (up to, and including this change) is to
1778  discard any "learned" configuration in favor of the explicitly new config
1779  passed to the server. This new option allows this information to be persisted
1780  when a new configuration update is received. This behavior is considered
1781  experimental, and is primarily intended to reduce the time it takes for the
1782  client to relearn the current node (which is typically under 1-2 seconds).
1783  * Priority: Minor
1784  * Issues: [CCBC-530](http://couchbase.com/issues/browse/CCBC-530)
1785
1786* Relocate memcached packets on topology changes for memcached buckets
1787  This enhances the behavior of the client when operating with a memcached
1788  bucket during a topology change. Previously the library would not relocate
1789  packets to new servers, resulting in errors for items which were now
1790  mapped to wrong nodes. The new behavior remaps the key to the new server
1791  using the updated ketama hashing. Note that as a current restriction, the
1792  remapping will be performed based on the key of the item, not any `hashkey`
1793  parameter being employed.
1794  * Priority: Major
1795  * Issues: [CCBC-331](http://couchbase.com/issues/browse/CCBC-331)
1796
1797* Return error if ignored/conflicting options are found
1798  This changes the behavior of the library to throw an error if a specific
1799  option field was filled in which did not make sense for a given command, for
1800  example, specifying a `cas` value using a `LCB_ADD` operation with `lcb_store`.
1801  * Priority: Major
1802  * Issues: [CCBC-529](http://couchbase.com/issues/browse/CCBC-529)
1803
1804* Fix issue when sending out large _OBSERVE_ command.
1805  This would cause a partial command to be sent out if the size of the output
1806  packet was greater than 512 bytes. This has been fixed by dynamically growing
1807  the output buffer for _OBSERVE_
1808  * Priority: Minor
1809  * Issues: [CCBC-528](http://couchbase.com/issues/browse/CCBC-528)
1810
1811* Fix spurious timeouts when using `lcb_durability_poll`
1812  This fixes an issue where sometimes the durability poll operation would
1813  prematurely time out.
1814  * Priority: Major
1815  * Issues: [CCBC-527](http://couchbase.com/issues/browse/CCBC-527)
1816
1817## 2.4.3 (Oct. 21 2014)
1818
1819* Disable support for SSLv3
1820  This works around the _POODLE_ SSLv3 vulnerability by disabling support for
1821  anything below TLSv1.
1822
1823  * Priority: Critical
1824  * Issues: [CCBC-523](http://couchbase.com/issues/browse/CCBC-523)
1825
1826* Pillowfight enhancements
1827  Several behavior changes were made to pillowfight in this version. These are:
1828  * The `-l` or `-c -1` option is in effect by default. This means that by
1829    default `pillowfight` will run an infinite number of cycles. The previous
1830    behavior was to default to a single cycle, requiring an explicit `--loop`
1831    to ensure the workload ran for a considerable amount of time.
1832
1833  * When multiple threads are used, the workload is divided among the threads,
1834    thus making it that each thread only operates on a subset of the data.
1835
1836  * A `--sequential` option has been added to allow the workload to operate
1837    in _sequence_ on the total number of items. This is useful when wishing to
1838    load a bucket with many items.
1839
1840  * A `--start-at` option has been added to allow the workload to specify an
1841    alternate range of keys; effectively allowing resumption of a previous
1842    run. The `--start-at` flag allows to specify the lower bound number which
1843    will be used to generate keys. Thus a `--num-items=20000` and a
1844    `--start-at=10000` will generate keys from 10000 through 30000.
1845
1846  * The _population_ phase has now been merged with the general workload
1847    implementation. This means that all worker threads will participate in
1848    the population phase. The previous behavior limited the populate phase to
1849    a single thread.
1850
1851  * If `stdout` is detected to be a terminal, a simple "OPS/SEC" meter will
1852    periodically write the estimated throughput to the screen.
1853
1854* Fix memory leak when using large read buffers
1855  In the case where large read buffers are used (and the `iovec` elements
1856  becomes sizable, the library may end up incorrectly caching some memory
1857  blocks for future use. This fix makes the blocks be cached at the allocator
1858  level, so that they are properly (re) utilized.
1859
1860  * Priority: Major
1861  * Issues: [CCBC-519](http://couchbase.com/issue/browse/CCBC-519)
1862
1863* Use forward map (and other heuristics) to get a next node for an item after
1864  a not-my-vbucket reply. Since the server (see bug attached) does not always
1865  guarantee that a given config is the most _correct_, the client must do some
1866  guesswork in order to properly map a node when it gets a not-my-vbucket;
1867  especially if the config says that the node is the correct one.
1868
1869  * Priority: Major
1870  * Issues: [MB-12268](http://couchbase.com/issues/browse/MB-12268)
1871
1872## 2.4.2 (Sep. 23 2014)
1873
1874* Mark the `hashkey` fields as being _volatile_.
1875  Usage of this field is not supported in many cluster systems and is thus not
1876  supported functionality. It exists primarily as a legacy from an older API
1877  * Priority: Major
1878  * Issues: [CCBC-508](http://couchbase.com/issues/browse/CCBC-508)
1879
1880* Add "key stats" mode to `lcb_CMDDSTATS`.
1881  This adds an additional key stats mode to the `lcb_stats3()` API
1882  which interprets the `key` field as being a document ID for which
1883  information (such as expiry, status) should be retrieved, rather
1884  than a system statistics key. Similar functionality already exists
1885  in the Java client library as `getKeyStats()`. In addition to this
1886  feature, a `cbc stats --keystats` option is also provided to employ
1887  this functionality from the command line.
1888  * Priority: Major
1889  * Issues: [CCBC-318](http://issues.couchbase.com/browse/CCBC-318)
1890
1891* Add more details about replica nodes in the `cbc hash` command.
1892  * Priority: Minor
1893  * Issues: [CCBC-504](http://couchbase.com/issues/browse/CCBC-504)
1894
1895* Add `lcb_cntl()` setting to retrieve bucket name.
1896  Previously the library did not have a means by which the bucket name
1897  could be retrieved. Using the `LCB_CNTL_BUCKETNAME` setting, the bucket
1898  name will now be returned.
1899  * Priority: Major
1900  * Issues: [CCBC-502](http://issues.couchbase.com/browse/CCBC-502)
1901
1902## 2.4.1
1903
1904
1905* Implement `mcflush` subcommand for `cbc`. This was removed in the cbc
1906  rewrite as the previous `flush` command.
1907  * Priority: Minor
1908  * Issues: [CCBC-486](http://couchbase.com/issues/browse/CCBC-486)
1909
1910
1911* Requests issued to an invalid replica via `lcb_get_replica()` should fail
1912  with the `LCB_NO_MATCHING_SERVER_CODE`. Previously this sometimes went
1913  through due to an incorrect bounds checking in the `lcbvb_vbreplica()`
1914  function.
1915  * Priority: Major
1916  * Issues: [CCBC-488](http://couchbase.com/issues/browse/CCBC-488)
1917
1918
1919* Fixed a memory leak in `lcb_get_replica()` when the operation would fail.
1920  * Priority: Major
1921  * Issues: [CCBC-489](http://couchbase.com/issues/browse/CCBC-489)
1922    [CCBC-490](http://couchbase.com/issues/browse/CCBC-490)
1923
1924
1925
1926* Fix memory leak in `lcb_sched_fail()` when extended commands are in the
1927  pipeline
1928  * Priority: Major
1929  * Issues: [CCBC-474](http://couchbase.com/issues/browse/CCBC-474)
1930
1931
1932
1933* Provide `lcb_dump()` function call to dump state information about
1934  a client handle. The function call itself is currently marked as
1935  volatile and the output format is very much likely to change.
1936  * Priority: Minor
1937  * Issues: [CCBC-491](http://couchbase.com/issues/browse/CCBC-490)
1938
1939
1940* Fix `ratio` argument in `cbc-pillowfight`. This ensures that the
1941  `ratio` argument will truly determine the ratio of gets to sets.
1942  * Priority: Minor
1943
1944* Fix crash when HTTP request is retried. This may take place during topology
1945  changes
1946  * Priority: Major
1947  * Issues: [CCBC-497](http://couchbase.com/issues/browse/CCBC-497)
1948
1949* Allow simple host-port string in connection string, giving it an implicit
1950  `http://` scheme. This allows easier backwards compatibility with some
1951  application
1952  * Priority: Minor
1953  * Issues: [CCBC-500](http://couchbase.com/issues/browse/CCBC-500)
1954
1955* Update some SSL options to better reflect server 3.0 functionality
1956  The old `capath` option has been renamed to `certpath` to indicate that the
1957  path is not to the signing authority, but to the self-signed server certificate
1958  generated by the server itself. Additionally the `no_verify` option has been
1959  hidden.
1960  * Priority: Major
1961  * Issues: [CCBC-501](http://couchbase.com/issues/browse/CCBC-501)
1962
1963## 2.4.0 GA
1964
1965* [major] Attempt to retry items that are mapped to a non-existent node in
1966  a degraded cluster. Rather than returning `LCB_NO_MATCHING_SERVER` the
1967  behavior should be to wait for the item to succeed and attempt to fetch
1968  a new cluster configuration.
1969
1970  In order to control how such 'orphaned' commands are handled, a new value
1971  has been added to the `lcb_RETRYMODEOPTS` called `LCB_RETRY_ON_MISSINGNODE`
1972  which dictates how commands should be rescheduled if the associated vbucket
1973  has no master. The default is to retry the command until it times out, but
1974  by setting this value to `0` (See `LCB_CNTL_RETRYMODE`) it may only be
1975  attempted once, causing 'fail fast' behavior in such a case.
1976
1977* [major] Don't throttle config requests based on initial file-based config.
1978  This allows the client to quickly recover from a stale config cache without
1979  waiting for the `LCB_CNTL_CONFDELAY_THRESH` interval to elapse. Prior to this
1980  fix, a client would appear to "not recover" if bootstrapping from a stale cache.
1981  In reality the client would eventually recover but was waiting for the delay
1982  threshold to elapse.
1983
1984* [major] Ignore `NOT_MY_VBUCKET` config payloads if CCCP provider is disabled.
1985  This allows the client to circumvent any possible bugs in the CCCP response
1986  payload and rely entirely on the HTTP config. It also allows 'rewriting'
1987  proxies like confsed to function.
1988
1989## 2.4.0-beta
1990
1991* [major] Better error reporting for SSL failures.
1992  This adds new error codes (`LCB_SSL_ERROR`, `LCB_SSL_CANTVERIFY`)
1993  which are returned on initialization and verification failures
1994  respectively.
1995
1996* [minor] Communication via legacy memcached servers is possible
1997  by using the `memcached://` scheme in the connection string.
1998
1999* [minor] Environment variables understood by the library are now
2000  documented in their own section.
2001
2002* [major] Add `lcb_get_node()` function to retrieve addresses for
2003  various nodes in the cluster. This deprecates the `lcb_get_host()`,
2004  `lcb_get_port()` and `lcb_get_server_list()` functions as they are
2005  constrained to only return information about the administrative API.
2006  The new function is configurable to return information about various
2007  ports.
2008
2009* [major] The `dsn` field in the `lcb_create_st` structure has been
2010  renamed to `connstr`.
2011
2012* [major] An HTTP request which has followed redirects will cause the
2013  `lcb_wait()` function to never return. This bug was introduced in
2014  2.4.0-DP1 and has now been fixed.
2015
2016* [minor] `lcb_get_server_list()` function now returns updated information
2017  from the current cluster configuration. Previously this would only return
2018  a node from the list specified during initial creation.
2019
2020* [minor] Provide additional error classifiers. Two error classifiers have
2021  been added, they are:
2022
2023  * `LCB_ERRTYPE_SRVLOAD` which indicates that the server is likely under high load.
2024  * `LCB_ERRTYPE_SRVGEN` which indicates that the error is a direct reply from the
2025    server. This code can help distinguish between client and server generated
2026    return codes.
2027
2028* [major] Provide HTTP keepalive and connection pooling for HTTP requests.
2029  This allows the client to reuse an HTTP connection for multiple requests
2030  rather than creating a new connection and closing it for each operation.
2031
2032  The functionality may be controlled via the `LCB_CNTL_HTTP_POOLSIZE` setting
2033  which limits how many open connections (per server) to maintain inside the
2034  client. Setting this value to `0` will disable pooling and restore old
2035  behavior.
2036
2037* [major] Properly schedule next invocations for retry queue. A bug was introduced
2038  in 2.4.0-dp1 which would cause the next tick callback to be invoked in what is
2039  effectively a busy loop. This would be reflected in higher CPU load and less
2040  throughput during topology changes.
2041
2042* [major] Return error if empty key is passed to an operation. Empty keys will
2043  cause the server to drop the connection.
2044  The error code returned is the newly added `LCB_EMPTY_KEY`
2045
2046* [minor] Provide setting to disable refreshing the configuration when an HTTP
2047  API error is encountered (from one of the HTTP callback functions). This
2048  adds the `LCB_CNTL_HTTP_REFRESH_CONFIG_ON_ERROR` setting.
2049
2050* [major] Fix bug where the CCCP provider may prematurely fail, activating the
2051  HTTP provider
2052
2053
2054## 2.4.0-dp1 (2014-06-18)
2055
2056
2057**Changes affecting older APIs**
2058
2059* [minor] Make `run_event_loop` and `stop_event_loop` private.
2060  These functions may no longer be used from within an application to
2061  start/stop the event loop. `lcb_wait()` and `lcb_wait3()` should be
2062  used instead.
2063
2064* [major] Deprecate the `lcb_set_XXX` functions. `lcb_set_timeout`
2065  and some other calls have been deprecated in favor of the `lcb_cntl()`
2066  interface. These functions will still work but will cause the compiler
2067  to print a deprecation warning.
2068
2069* [minor] `lcb_socket_t` is typedefed to a `DWORD` on windows. In
2070  previous versions this was an `int`.
2071
2072* [minor] Connecting to a standalone memcached instance is currently no longer
2073  supported.
2074
2075* [major] `lcb_set_error_callback()` has been deprecated. Applications should
2076  use the new `lcb_set_bootstrap_callback()` and/or operation callbacks
2077  to determine success/failure status.
2078
2079* [major] `lcb_get_last_error()` has been deprecated. Error information is always
2080  returned in the operation callback
2081
2082* [major] Disable the sending of `GETQ` packets. The format of this command
2083  is cumbersome to deal with and in most uses cases is actually slightly
2084  _less_ efficient on the network. Note that this does not change the API
2085  of the actual `lcb_get()` call, but simply changes the format of the
2086  packets sent over the wire.
2087
2088* [major] The IOPS API has been changed. This is considered volatile interface
2089  and may subsequently change in the future as well.
2090
2091**New APIs added in 2.4.0 extending existing functionality**
2092
2093These changes extend existing features with enhanced APIs
2094
2095* [major] Additional APIs for `lcb_cntl()`. These consist of helper functions
2096  to make it easier to use simple types or strings rather than pointers, if
2097  possible. These functions are `lcb_cntl_string()`, `lcb_cntl_setu32()` and
2098  `lcb_cntl_getu32()`
2099
2100* [minor] Provide extended version of `lcb_wait()`.
2101  A new function called `lcb_wait3()` has been added which offers additional
2102  options with respect to running the event loop. Specifically it offers to
2103  bypass the check for pending operations which `lcb_wait()` executes. This
2104  is both more performant and allows us to wait for operations which are
2105  not explicitly scheduled.
2106
2107* [major] Provide API to request a configuration refresh.
2108  Sometimes it is necessary to force the client to request a new configuration,
2109  for example in certain failover conditions. A new API called `lcb_config_refresh()`
2110  has been added, and should be used in conjunction with `lcb_wait3()`.
2111
2112* [major] Provide bootstrapping notification callback
2113  This provides an explicit `lcb_set_bootstrap_callback()` to definitively
2114  determine whether the client has received its initial configuration (and
2115  thus may now start performing operations) or whether it failed (and thus
2116  must be reinitialized). This deprecates the common use case of
2117  `lcb_set_error_callback()`.
2118
2119* [major] New vBucket interface/API. This API is used internally and exposed
2120  as _volatile_ inside the public header files. It provides extended features,
2121  a more concise API, and is compatible with the upcoming Couchbase 3.0 config
2122  format. Note that file-based configuration caches written by this version of
2123  the library are incompatible with previous versions, however this version may
2124  read caches generated by previous versions. This is because this version generates
2125  a stripped-down version of the "terse" configuration style.
2126
2127* [major] Extended detailed error codes.
2128  These error codes expose more detail about the `NETWORK_ERROR` and
2129  `CONNECT_ERROR` codes returned by previous versions of the library. The extended
2130  codes are not returned by default and must be explicitly enabled in order to
2131  retain backwards compatibility with applications which rely on the older
2132  error codes.
2133
2134
2135**New Features in 2.4.0**
2136
2137* [major] Connection Strings (aka "dsn") feature for instance creation. This adds a new
2138  version of the `lcb_create_st` structure which is passed a URI-like string
2139  rather than a semicolon-delimited list of hosts. This string is used to
2140  provide options and the list of hosts that the library should connect to.
2141  For example, `couchbase://default/localhost&compression=off`
2142
2143* [major] SSL transport support for Couchbase 3.0 Enterprise.
2144  Couchbase 3.0 enterprise features the ability to encrypt communications
2145  between the client and the server using the SSL protocol. SSL protocol
2146  support in _libcouchbase_.
2147
2148* [major] Retry queue for failed operations. The retry queue is used
2149  as a place to place operations which have failed internally and which
2150  should be retried within a certain amount of time. This also provides
2151  options on which commands should be retried.
2152
2153* [minor] Compression/JSON flag (aka Datatype) support
2154  This adds support for a future feature of Couchbase server which will
2155  feature transparent compression. This feature also allows the server
2156  to signal to the library if a document is JSON or not. The compression
2157  feature may be disabled at compile-time, and may also be modified at
2158  runtime by setting `compression=off` in either the connection string
2159  or via `lcb_cntl_setstring(instance, "compression", "off")`
2160
2161* [major] Experimental _scheduling_ API. This API replaces most of the older
2162  operation APIs with a scheduling API. These APIs are called with one
2163  command at a time and insert the resultant packet into a pipeline. The
2164  user may "schedule" the commands or "fail" the pipeline if a certain
2165  request has failed to be scheduled.
2166
2167  This API also provides a common ABI header for commands so that they may
2168  easily be used via type-punning, or wrapped as a class hierarchy in C++.
2169
2170  This API is currently considered volatile but will be the basis of the
2171  upcoming libcouchbase 3.0 API. The header file is `<libcouchbase/api3.h>`
2172
2173* [major] Raw memcached packets may be sent to the library and have a callback
2174  invoked when their responses have been received.
2175  This adds an `lcb_pktfwd3()` API. This requires the new scheduling API.
2176
2177
2178**Bug Fixes in 2.4.0**
2179
2180* [major] _select_ plugin may endlessly loop in some cases
2181  The plugin may loop if there was a long timeout from the
2182  future .
2183
2184* [major] Do not break TCP connections on topology changes unless ejected from
2185  cluster. This ensures that nodes which are still part of the cluster have their
2186  TCP connections remain in tact despite being shifted in their server index values.
2187  Packets which have been sent to the wrong vBucket are silently ignored and
2188  rescheduled to their appropriate destination. This decreases load significantly
2189  on the client, network, and cluster during topology changes.
2190
2191* [major] Use new-style "Terse" URI format when requesting a configuration over HTTP.
2192  This uses the HTTP configuration format over the new `/pools/default/bs/default`
2193  rather than the older `/pools/default/bucketsStreaming/default` form. The former
2194  form is much more efficient on the cluster side. If the new URI form is not
2195  supported (i.e. the server responds with an HTTP 404) the older form will be
2196  used instead. You may modify this behavior by setting the `LCB_CNTL_HTCONFIG_URLTYPE`
2197  setting via `lcb_cntl()`.
2198
2199* [minor] The `cmake/configure` script now accepts the `LDFLAGS`, `CPPFLAGS`, `CFLAGS`,
2200  `CXXFLAGS`, `CC`, and `CXX` settings both within the environment _and_ the
2201  commandline, so the forms of `CC=clang ./cmake/configure` and
2202  `./cmake/configure CC=clang` are equivalent.
2203
2204* [minor] The `pillowfight` tool will now print latencies between 1-10ms in resolutions
2205  of 100us.
2206
2207
2208**Metadata and Packaging Changes in 2.4.0**
2209
2210* [major] Use Doxygen for API documentation.
2211  This replaces the _manpages_ for API documentation with Doxygen. Doxygen
2212  is a free and portable documentation system which may be obtained from your
2213  distribution or at [](http://doxygen.org). To generate the documentation
2214  from the source tree, simply run `doxygen` from the source root directory.
2215  To generate internal documentation, run `./docs/gen_internal_apidoc.sh`.
2216
2217* [major] Add interface attributes to all API calls
2218  This properly documents all API calls with a certain API stability level
2219  such as _committed_ (for stable APIs), _uncommitted_ for APIs which may, but
2220  are not likely to change, and _volatile_ for APIs which are likely to be
2221  changed or removed.
2222
2223* [major] Public header files have been reorganized
2224  This changes the layout of the header files from previous versions. This should
2225  not affect applications as applications should only ever include the main
2226  `<libcouchbase/couchbase.h>` file.
2227
2228  the following files have been _removed_ from the
2229  `<libcouchbase/*>` header directory:
2230
2231    * `types.h` - Merged into other header files
2232    * `arguments.h` - now a part of `couchbase.h`
2233    * `callbacks.h` - now a part of `couchbase.h`
2234    * `debug.h` - unused and obsolete
2235    * `durability.h` - now a part of `couchbase.h`
2236    * `behavior.h` - Merged into `deprecated.h`
2237    * `sanitycheck.h` - Merged into `deprecated.h`
2238    * `timings.h` - Part of `couchbase.h`
2239    * `compat.h` - Part of `deprecated.h`
2240
2241  The following files have been _added_ into the `<libcouchbase/*>` directory.
2242  Unless otherwise noted, these files are included by `<libcouchbase/couchbase.h>`:
2243
2244    * `api3.h` - Volatile proposed 3.0 API. **Not included by default**
2245    * `cxxwrap.h` - Contains the implementation for the deprecated C++ wrappers
2246    * `deprecated.h` - Contains deprecated APIs
2247    * `iops.h` - Contains the IO integration APIs
2248    * `pktfwd.h` - Contains the packet forwarding API. **Not included by default**
2249    * `vbucket.h` - Contains the vBucket mapping API. **Not included by default**
2250
2251* OpenSSL is now a base dependency for the library. This may be disabled at configure
2252  time via `--enable-ssl=no`. See `./configure --help`.
2253
2254* Snappy compression library is bundled and optionally compiled. This is left out by
2255  default as the configure script will search for a system installed `libsnappy`.
2256  Snappy provides the compression feature needed for compressing and inflating data
2257  between client and server. It may be disabled at compile-time via `--enable-snappy=no`
2258
2259* [minor] _libvbucket_ has been fully integrated into libcouchbase from the forked
2260  _libvbucket_ package and, lives fully as part of the
2261  library. The public vBucket API may be found in `<libcouchbase/vbucket.h>`.
2262
2263* [minor] As an alternative to the cross-platform `lcb_uintNN_t` typedefs, a shorter
2264  (and more standards compliant) alternative `lcb_UNN` typedefs are provided, thus
2265  instead of `lcb_uint32_t` you may use `lcb_U32`. The full listing of cross platform
2266  typdefs may be found inside `<libcouchbase/sysdefs.h>`
2267
2268
2269
2270## 2.3.1 (2014-05-08)
2271
2272* [major] CCBC-404: Segfault in `connmgr_invoke_request`
2273  Occasionally a segmentation fault would happen when a connection was being
2274  released as a result of a connection failure. This was because of invalid
2275  list tracking.
2276
2277* [major] CCBC-395: Add `lcb_cntl()` interface for configuration cache
2278  Configuration cache options may be set after instantiation using `lcb_cntl()`
2279  with the new `LCB_CNTL_CONFIGCACHE` operation. The old-style `lcb_create_compat`
2280  creation path is deprecated.
2281
2282* [major] CCBC-394: Get-with-replica occasionally crashes on Windows and UV
2283  during topology changes. This was due to not allocating a buffer if one did
2284  not exist.
2285
2286* [major] CCBC-392: ABI compatibility broken between 2.x and 2.3 for
2287  `lcb_create_compat`. This has been fixed by symbol aliasing between versions.
2288  Developers are recommended to use the `lcb_cntl()` API to set the
2289  configuration cache, as specified in CCBC-395
2290
2291* [major] CCBC-385: Failed assertion on get-with-replica when connection fails.
2292  If a connection fails with a `CMD_GET_REPLICA` command still in the queue an
2293  assertion failure will crash the library. This has been fixed by handling the
2294  opcode in the `failout_single_request` function.
2295
2296* [major] CCBC-384: Unknown Winsock error codes crash application. This was fixed
2297  by providing proper handlers for Winsock codes which were not explicitly
2298  converted into their POSIX equivalents.
2299
2300* [major] CCBC-376: Fix memory leak in configuration parsing. A leak was
2301  introduced in version 2.3.0 by not freeing the JSON pool structure. This has
2302  been fixed in 2.3.1
2303
2304* [minor] CCBC-370: `lcb_get_host` and `lcb_get_port` may return host-port
2305  combinations from different servers. If multiple servers are listening on
2306  different ports this may result in yielding an invalid endpoint by combining
2307  the output from those two functions. This has been fixed in 2.3.1 by returning
2308  the host and port from the first host, in lieu of a currently-connected REST
2309  endpoint.
2310
2311* [minor] CCBC-368: Initial bootstrapping failure may mask `LCB_BUCKET_ENOENT`
2312  calls with `LCB_ETIMEDOUT`. This has been fixed by not retrying configuration
2313  retrieval if an explicit HTTP 404 code is received. Note that when using
2314  bootstrap over memcached, a missing bucket may still be manifest as
2315  `LCB_AUTH_ERROR`.
2316
2317* [minor] CCBC-367: Ensure `lcb_get_host` does not return `NULL` when the
2318  associated `lcb_t` is of `LCB_TYPE_CLUSTER`. This would cause crashes in some
2319  applications which relied on this function to not return `NULL`.
2320
2321* [major] CCBC-389: Fixed Spurious timeouts being delivered in asynchronous
2322  use cases.
2323  In applications which do not use `lcb_wait()` the library will potentially
2324  time out commands internally triggering an erroneous configuration refresh.
2325  While this issue would not end up failing operations it will cause unnecessary
2326  network traffic for retrieving configurations. Applications using `lcb_wait()`
2327  are not affected as that function resets the timeout handler.
2328
2329* [major] CCBC-332, CCBC-364: Compare configuration revision information
2330  for memcached cluster bootstrap. Previously we would refresh the
2331  configuration upon receipt
2332  of any new configuration update from memcached. This is fixed in 2.3.1 where
2333  the configuration will only be applied if it is deemed to be newer than the
2334  current configuration. With memcached bootstrap this is only true if the
2335  configuration's `rev` field is higher than the current one.
2336
2337
2338## 2.3.0 GA (2014-04-07)
2339
2340* [major] CCBC-152: Provide a master-only observe option. This adds a new
2341  struct version to the `lcb_observe_cmd_t` which allows to select only the
2342  master node. One can use this to efficiently check if the key exists (without
2343  retrieving it). It also allows one to get the CAS of the item without fetching
2344  it.
2345
2346* [major] CCBC-281: Fix partial scheduling during multi operations. Previously
2347  the library would deliver spurious callbacks  if multiple operations were
2348  scheduled with a single command and one of the operations could not be mapped
2349  to a server. This fixes this behavior and ensures that callbacks are only
2350  invoked for items if the entire API call succeeded.
2351
2352* [major] CCBC-150: Multi-packet commands will no longer deliver spurious
2353  callbacks on failure. Previously these commands would be relocated to the
2354  same server during a configuration change, resulting in multiple callbacks
2355  for the same command. In this case the client would think all the commands
2356  had been completed, and when the next response arrived it would incorrectly
2357  map it to a different request.
2358
2359* [minor] CCBC-327: Fix assumption of `vbucket_compare()` only returning if
2360  a diff exists. This function actually returns a non-NULL pointer always
2361  unless it cannot allocate more memory. This bug was introduced with the
2362  _DP1_ release.
2363
2364* [minor] CCBC-326: Memcached buckets should use streaming config. This was
2365  left unchecked in the _DP1_ release and has now been fixed.
2366
2367* [major] CCBC-351: Enhance performance for configuration parsing. In previous
2368  versions receiving multiple configurations at once would cause CPU spikes on
2369  slower systems. The configuration parser code has been optimized to alleviate
2370  this issue.
2371
2372* [minor] CCBC-350: Provide `lcb_cntl()` API to retrieve the SCM changeset used
2373  by the currently loaded binary. This is a more effective way to get the
2374  revision as it does not depend on the specific headers the library was
2375  compiled with.
2376
2377* [major] CCBC-340: Correctly parse `""`, `"0"` and `"1"` for environment
2378  variables. In previous versions having the entry set to an empty string
2379  or `0` would still be treated by the library as a true value for various
2380  environment variables. This has been fixed so that clear "False" values
2381  such as the empty string or 0 are treated as such.
2382
2383
2384## 2.3.0-dp1 (2014-02-04)
2385
2386* [major] CCBC-234: Implementation of
2387  [Cluster Configuration Carrier Publication][cccp-wiki]. This is the new and
2388  more efficient way to bootstrap from a cluster using the native memcached
2389  protocol and is quicker than the previous HTTP bootstrap mechanism, dramatically
2390  improving startup times and reducing load on the server. This feature is
2391  available in server verions 2.5 and greater. The existing HTTP configuration is
2392  still supported and will be employed as a fallback in the event that `CCCP`
2393  is not supported.
2394
2395  In conjunction with this, a new struct version has been added to the
2396  `lcb_create_st` parameters structure for use with `lcb_create`. This allows
2397  you to get more control over how the client is initialized:
2398
2399    lcb_t instance;
2400    struct lcb_create_st options;
2401    lcb_config_transport_t enabled_transports = {
2402        LCB_CONFIG_TRANSPORT_CCCP,
2403        LCB_CONFIG_TRANSPORT_LIST_END
2404    };
2405
2406    memset(&options, 0, sizeof(options));
2407    options.version = 2;
2408    options.v.v2.mchosts = "example.com:11210";
2409    options.v.v2.transports = enabled_transports;
2410
2411    lcb_error_t rc = lcb_create(&instance, &options);
2412    if (rc != LCB_SUCCESS) {
2413        fprintf(stderr, "Failed to create instance: %s
2414", lcb_strerror(instance, rc));
2415    }
2416
2417  The above snippet will configure a client to _always_ use the `CCCP` protocol
2418  and never attempt to fall back on HTTP
2419
2420  The CCCP implementation required a significant rewrite in how sockets were
2421  created and re-used. Particularly, a connection pooling feature was implemented.
2422
2423  Additionally, the `cbc` command now has an additional `-C` option which accepts
2424  the preferred configuration mechanism to use.
2425
2426* [major] CCBC-305: Implement logging hooks.
2427
2428  This improvements adds various levels of diagnostic logging with the library
2429  itself. It may be utilized via the environment (by setting the `LCB_LOGLEVEL`
2430  environment variable to a positive integer -- the higher the number the more
2431  verbose the logging).
2432
2433  Integrators may also use the logging API specified in `<libcouchbase/types.h>`
2434  to proxy the library's logging messages into your own application.
2435
2436  Current events logged include connection initialization, destruction, connection
2437  pool management, configuration changes, and timeouts.
2438
2439  By default the library is silent.
2440
2441* [major] CCBC-316: Allow per-node bootstrap/config timeouts.
2442  This change allows more finer grained control over how long to wait per-node
2443  to receive updated configuration info. This setting helps adjust the initial
2444  and subsequent bootstrap processes to help ensure each node gets a slice of
2445  time.
2446
2447* [major] CCBC-297: Handle spurious EWOULDBLOCK on UV/Win32
2448  This issue caused odd errors on Windows when large amounts of data
2449  would be received on the socket.
2450
2451## 2.2.0 (2013-10-05)
2452
2453* [major] CCBC-169 Handle 302 redirects in HTTP (views, administrative
2454  requests). By default the library will follow up to three redirects.
2455  Once the limit reached the request will be terminated with code
2456  `LCB_TOO_MANY_REDIRECTS`. Limit is configurable through
2457  `LCB_CNTL_MAX_REDIRECTS`. If set to -1, it will disable redirect
2458  limit.
2459
2460      int new_value = 5;
2461      lcb_cntl(instance, LCB_CNTL_SET, LCB_CNTL_MAX_REDIRECTS, &new_value);
2462
2463* [major] CCBC-243 Replace isasl with cbsasl, the latter has
2464  implemented both PLAIN and CRAM-MD5 authentication mechanisms.
2465
2466  * `LCB_CNTL_MEMDNODE_INFO` command updated to include effective
2467    SASL mechanism:
2468
2469        cb_cntl_server_t node;
2470        node.version = 1;
2471        node.v.v1.index = 0; /* first node */
2472        lcb_cntl(instance, LCB_CNTL_GET, LCB_CNTL_MEMDNODE_INFO, &node);
2473        if (node.v.v1.sasl_mech) {
2474            printf("authenticated via SASL '%s'
2475",
2476                   node.v.v1.sasl_mech);
2477        }
2478
2479  * It is also possible to force specific authentication mechanism for
2480    the connection handle using `LCB_CNTL_FORCE_SASL_MECH` command:
2481
2482        lcb_cntl(instance, LCB_CNTL_SET, LCB_CNTL_FORCE_SASL_MECH, "PLAIN");
2483
2484* [major] CCBC-286 libuv plugin: use same CRT for free/malloc
2485
2486* [major] CCBC-288 Fail `NOT_MY_VBUCKET` responses on timeout
2487
2488* [major] CCBC-275 Do a full purge when negotiation times out. In this
2489  case we must purge the server from all commands and not simply pop
2490  individual items.
2491
2492* [major] CCBC-275 Reset the server's buffers upon reconnection. This
2493  fixes a crash experienced when requesting a new read with the
2494  previous buffer still in tact. This was exposed by calling
2495  `lcb_failout_server` on a timeout error while maintaining the same
2496  server struct.
2497
2498* [major] CCBC-282 Make server buffers reentrant-safe. When purging
2499  implicit commands, we invoke callbacks which may in turn cause other
2500  LCB entry points to be invoked which can shift the contents and/or
2501  positions of the ringbuffers we're reading from.
2502
2503* [major] CCBC-204, CCBC-205 Stricter/More inspectable behavior for
2504  config cache. This provides a test and an additional `lcb_cntl`
2505  operation to check the status of the configuration cache. Also it
2506  switches off config cache with memcached buckets.
2507
2508      int is_loaded;
2509      lcb_cntl(instance, LCB_CNTL_GET, LCB_CNTL_CONFIG_CACHE_LOADED, &is_loaded);
2510      if (is_loaded) {
2511          printf("Configuration cache saved us a trip to the config server
2512");
2513      } else {
2514          printf("We had to contact the configuration server for some reason
2515");
2516      }
2517
2518* [major] CCBC-278 Use common config retry mechanism for bad
2519  configcache. This uses the same error handling mechanism as when a
2520  bad configuration has been received from the network. New
2521  `LCB_CONFIG_CACHE_INVALID` error code to notify the user of such a
2522  situation
2523
2524* [major] CCBC-274 Handle getl/unl when purging the server (thanks
2525  Robert Groenenberg)
2526
2527* [major] Don't failout all commands on a timeout. Only fail those
2528  commands which are old enough to have timed out already.
2529
2530* [major] CCBC-269 Don't record and use TTP/TTR from observe. Just
2531  poll at a fixed interval, as the responses from the server side can
2532  be unreliable.
2533
2534* [minor] Allow hooks for mapping server codes to errors. This also
2535  helps handle sane behavior if a new error code is introduced, or
2536  allow user-defined logging when a specific error code is received.
2537
2538      lcb_errmap_callback default_callback;
2539
2540      lcb_error_t user_map_error(lcb_t instance, lcb_uint16_t in)
2541      {
2542        if (in == PROTOCOL_BINARY_RESPONSE_ETMPFAIL) {
2543          fprintf(stderr, "temporary failure on server
2544");
2545        }
2546        return default_callback(instance, in);
2547      }
2548
2549      ...
2550
2551      default_callback = lcb_set_errmap_callback(conn, user_map_error);
2552
2553* [minor] Add an example of a connection pool. See
2554  `example/instancepool` directory
2555
2556* [minor] CCBC-279 Force `lcb_wait` return result of wait operation
2557  instead of `lcb_get_last_error`. It returns `last_error` if and only
2558  if the handle is not yet configured
2559
2560* [minor] CCBC-284 `cbc-pillowfight`: compute item size correctly
2561  during set If `minSize` and `maxSize` are set to the same value it
2562  can sometimes crash since it may try to read out of memory bounds
2563  from the allocated data buffer.
2564
2565* [minor] CCBC-283 Apply key prefix CLI option in cbc-pillowfight
2566
2567* [minor] Add `--enable-maintainer-mode`. Maintainer mode enables
2568  `--enable-werror --enable-warnings --enable-debug`, forces all
2569  plugins to be installed and forces all tests, tools, and examples to
2570  be built
2571
2572* [minor] CCBC-255 Expose `LCB_MAX_ERROR` to allow user-defined codes
2573
2574## 2.1.3 (2013-09-10)
2575
2576* [minor] Updated gtest to version 1.7.0. Fixes issue with building
2577  test suite with new XCode 5.0 version being released later this
2578  month.
2579
2580* [major] CCBC-265 Do not try to parse config for `LCB_TYPE_CLUSTER`
2581  handles. It fixes timouts for management operations (like 'cbc
2582  bucket-create', 'cbc bucket-flush', 'cbc bucket-delete' and 'cbc
2583  admin')
2584
2585* [major] CCBC-263 Skip unfinished SASL commands on rebalance. During
2586  rebalance, it is possible that the newly added server doesn't have
2587  chance to finish SASL auth before the cluster will push config
2588  update, in this case packet relocator messing cookies. Also the
2589  patch makes sure that SASL command/cookie isn't mixing with other
2590  commands
2591
2592* [major] Use cluster type connection for cbc-bucket-flush. Although
2593  flush command is accessible for bucket type connections,
2594  cbc-bucket-flush doesn't use provided bucket name to connect to,
2595  therefore it will fail if the bucket name isn't "default".
2596
2597* [major] Allow to make connect order deterministic. It allows the
2598  user to toggle between deterministic and random connect order for
2599  the supplied nodes list. By default it will randomize the list.
2600
2601* [major] Do not allow to use Administrator account for
2602  `LCB_TYPE_BUCKET`
2603
2604* [major] CCBC-258 Fig segmentation faults during tests load of
2605  node.js. Sets `inside_handler` on `socket_connected`. Previously we
2606  were always using SASL auth, and as such, we wouldn't flush packets
2607  from the `cmd_log` using `server_send_packets` (which calls
2608  `apply_want`). `apply_want` shouldn't be called more than once per
2609  event loop entry -- so this sets and unsets the `inside_handler`
2610  flag.
2611
2612* [major] Added support of libuv 0.8
2613
2614* [major] Close config connection before trying next node. It will fix
2615  asserts in case of the config node becomes unresponsive, and the
2616  threshold controlled by `LCB_CNTL_CONFERRTHRESH` and `lcb_cntl(3)`
2617
2618## 2.1.2 (2013-08-27)
2619
2620* [major] CCBC-253, CCBC-254 Use bucket name in SASL if username
2621  omitted. Without this fix, you can may encounter a segmentation
2622  faults for buckets, which are not protected by a password.
2623
2624* [major] Preserve IO cookie in `options_from_info` when using v0
2625  plugins with user-provided IO loop instance. This issue was
2626  introduced in 2.1.0.
2627
2628* [minor] Display the effective IO backend in 'cbc-version'. This is
2629  helpful to quickly detect what is the effective IO plugin on a given
2630  system.
2631
2632## 2.1.1 (2013-08-22)
2633
2634* [minor] Use provided credentials for authenticating to the data
2635  nodes. With this fix, it is no longer possible to use Administrator
2636  credentials with a bucket. If your configuration does so, you must
2637  change the credentials you use before applying this update. No
2638  documentation guides use of Administrator credentials, so this
2639  change is not expected to affect few, if any deployments.
2640
2641* [major] CCBC-239 Do not use socket after failout. Fixes segmentation
2642  faults during rebalance.
2643
2644* [minor] CCBC-245 Distribute debug information with release binaries
2645  on Windows
2646
2647* [minor] CCBC-248 Do not disable config.h on UNIX-like platforms. It
2648  fixes build issue, when application is trying to include plugins
2649  from the tarball.
2650
2651* [major] CCBC-192 Skip misconfigured nodes in the list. New
2652  lcb\_cntl(3couchbase) added to control whether the library will skip
2653  nodes in initial node list, which listen on configuration port (8091
2654  usually) but doesn't meet required parameters (invalid
2655  authentication or missing bucket). By default report this issue and
2656  stop trying nodes from the list, like all previous release. Read
2657  more at man page lcb\_cntl(3couchbase) in section
2658  LCB\_CNTL\_SKIP\_CONFIGURATION\_ERRORS\_ON\_CONNECT
2659
2660* [major] CCBC-246 Fallback to 'select' IO plugin if default plugin
2661   cannot be loaded. On UNIX-like systems, default IO backend is
2662   'libevent', which uses third-party library might be not available
2663   at the run-time. Read in lcb\_cntl(3couchbase) man page in section
2664   LCB\_CNTL\_IOPS\_DEFAULT\_TYPES about how to determine effective IO
2665   plugin, when your code chose to use LCB\_IO\_OPS\_DEFAULT during
2666   connection instantiation. The fallback mode doesn't affect
2667   application which specify IO backend explicitly.
2668
2669## 2.1.0 (2013-08-17)
2670
2671* [major] New backend `select`. This backend is based on the select(2)
2672  system call and its Windows version. It could be considered the most
2673  portable solution and is available with the libcouchbase core.
2674
2675* [major] CCBC-236 New backend `libuv`. This backend previously was
2676  part of the `couchnode` project and is now available as a plugin.
2677  Because libuv doesn't ship binary packages there is no binary
2678  package `libcouchbase2-libuv`. You can build plugin from the source
2679  distribution, or through the `libcouchbase-dev` or
2680  `libcouchbase-devel` package on UNIX like systems.
2681
2682* [major] New backend `iocp`. This is a Windows specific backend,
2683  which uses "I/O Completion Ports". As a part of the change, a new
2684  version of plugin API was introduced which is more optimized to this
2685  model of asynchronous IO.
2686
2687* [major] CCBC-229 Fixed bug when REPLICA\_FIRST fails if first try
2688  does not return key
2689
2690* [major] CCBC-228 Fixed bug when REPLICA\_SELECT didn't invoke
2691  callbacks for negative error codes
2692
2693* [major] CCBC-145 API for durability operations. This new API is
2694  based on `lcb_observe(3)` and allows you to monitor keys more
2695  easily. See the man pages `lcb_durability_poll(3)` and
2696  `lcb_set_durability_callback(3)` for more info.
2697
2698* [major] New configuration interface lcb\_cntl(3) along with new
2699  tunable options of the library and connection instances. In this
2700  release the following settings are available. See the man page for
2701  more information and examples.:
2702
2703  * LCB\_CNTL\_OP\_TIMEOUT operation timeout (default 2.5 seconds)
2704
2705  * LCB\_CNTL\_CONFIGURATION\_TIMEOUT time to fetch cluster
2706    configuration. This is similar to a connection timeout (default 5
2707    seconds)
2708
2709  * LCB\_CNTL\_VIEW\_TIMEOUT timeout for couchbase views (default 75
2710    seconds)
2711
2712  * LCB\_CNTL\_HTTP\_TIMEOUT timeout for other HTTP operations like
2713    RESTful flush, bucket creating etc. (default 75 seconds)
2714
2715  * LCB\_CNTL\_RBUFSIZE size of the internal read buffer (default
2716    32768 bytes)
2717
2718  * LCB\_CNTL\_WBUFSIZE size of the internal write buffer (default
2719    32768 bytes)
2720
2721  * LCB\_CNTL\_HANDLETYPE type of the `lcb\_t` handler (readonly)
2722
2723  * LCB\_CNTL\_VBCONFIG returns pointer to VBUCKET\_CONFIG\_HANDLE
2724    (readonly)
2725
2726  * LCB\_CNTL\_IOPS get the implementation of IO (lcb\_io\_opt\_t)
2727
2728  * LCB\_CNTL\_VBMAP get vBucket ID for a given key
2729
2730  * LCB\_CNTL\_MEMDNODE\_INFO get memcached node info
2731
2732  * LCB\_CNTL\_CONFIGNODE\_INFO get config node info
2733
2734  * LCB\_CNTL\_SYNCMODE control synchronous behaviour (default
2735    LCB\_ASYNCHRONOUS)
2736
2737  * LCB\_CNTL\_IP6POLICY specify IPv4/IPv6 policy (default
2738    LCB\_IPV6\_DISABLED)
2739
2740  * LCB\_CNTL\_CONFERRTHRESH control configuration error threshold
2741    (default 100)
2742
2743  * LCB\_CNTL\_DURABILITY\_TIMEOUT durability timeout (default 5 seconds)
2744
2745  * LCB\_CNTL\_DURABILITY\_INTERVAL durability polling interval (default
2746    100 milliseconds)
2747
2748  * LCB\_CNTL\_IOPS\_DEFAULT\_TYPES get the default IO types
2749
2750  * LCB\_CNTL\_IOPS\_DLOPEN\_DEBUG control verbose printing of dynamic
2751    loading of IO plugins.
2752
2753## 2.0.7 (2013-07-10)
2754
2755* [major] CCBC-183 Improve `lcb_get_replica()`. Now it is possible
2756  to choose between three strategies:
2757
2758  1. `LCB_REPLICA_FIRST`: Previously accessible and now the default,
2759     the caller will get a reply from the first replica to successfully
2760     reply within the timeout for the operation or will receive an
2761     error.
2762
2763  2. `LCB_REPLICA_ALL`: Ask all replicas to send documents/items
2764     back.
2765
2766  3. `LCB_REPLICA_SELECT`: Select one replica by the index in the
2767     configuration starting from zero. This approach can more quickly
2768     receive all possible replies for a given topology, but it can
2769     also generate false negatives.
2770
2771  Note that applications should not assume the order of the
2772  replicas indicates more recent data is at a lower index number.
2773  It is up to the application to determine which version of a
2774  document/item it may wish to use in the case of retrieving data
2775  from a replica.
2776
2777## 2.0.6 (2013-05-07)
2778
2779* [major] CCBC-188 Fix segfault when rebalancing
2780  When a (!connected) server is reconnected, the tasks in its
2781  "pending" buffer will be moved into "output" buffer. If its
2782  connection is broken again immediately, `relocate_packets()` will go
2783  to wrong path.
2784
2785* [major] CCBC-202 Don't try to switch to backup nodes when timeout is
2786  reached
2787
2788* [major] CCBC-188 Check if SASL struct is valid before disposing
2789
2790* [major] Fix compile error with sun studio
2791  "src/event.c", line 172: error: statement not reached (`E_STATEMENT_NOT_REACHED`)
2792
2793* [major] Don't invoke HTTP callbacks after cancellation, because
2794  user code might assume a previously-freed resource is still valid
2795
2796* [minor] CCBC-179 Added an example to properly use the bucket
2797  credentials for authentication instead of administrator credentials
2798
2799* [minor] example/yajl/couchview.c: pass cookie to the command
2800  Fixes coredump when executing ./examples/yajl/couchview
2801
2802* [minor] CCBC-201 Add Host header in http request
2803  http://cbugg.hq.couchbase.com/bug/bug-555 points out that Host is a
2804  required field in HTTP 1.1
2805
2806## 2.0.5 (2013-04-05)
2807
2808* [minor] Try to search the --libdir for modules if dlopen
2809  fails to find the module in the default library path
2810
2811* [minor] CCBC-190 New compat mode (experimental) for configuration
2812  caching. See man `lcb_create_compat()`
2813
2814* [minor] Manpage fixes
2815
2816* [minor] Fix build on FreeBSD (http://review.couchbase.org/25289)
2817
2818* [minor] Fix reconnecting issues on windows
2819  (http://review.couchbase.org/25170 and
2820   http://review.couchbase.org/25155)
2821
2822* [minor] pillowfight example updated to optionally use threads
2823
2824## 2.0.4 (2013-03-06)
2825
2826* [minor] CCBC-185 The bootstrap URI is not parsed correctly
2827
2828* [minor] CCBC-175 Work properly on systems where EWOULDBLOCK != EAGAIN
2829
2830* [critical] CCBC-180 Segmentation fault when the hostname resolved
2831  into several addresses and first of them reject couchbase
2832  connections.
2833
2834* [major] CCBC-182 The library stops iterating backup nodes list if
2835  the next one isn't accessible.
2836
2837* [major] CCBC-147 Fixed illegal memory access in win32 plugin
2838
2839* [minor] CCBC-178 Build error on solaris/sparc: -Werror=cast-align
2840
2841## 2.0.3 (2013-02-06)
2842
2843* [minor] bypass SASL LIST MECH
2844
2845* [minor] Shrink internal lookup tables (and reduce the size of
2846  `lcb_t`)
2847
2848* [minor] Add a new library: `libcouchbase_debug.so` (see
2849  include/libcouchbase/debug.h) which is a new library that contains
2850  new debug functionality.
2851
2852* [minor] Added manual pages for the library
2853
2854* [major] CCBC-153 Reset internal state on `lcb_connect()`. Allow caller
2855  to use `lcb_connect()` multiple times to implement reconnecting using
2856  the same `lcb_t` instance. Also it sets up the initial-connection
2857  timer for users who don't use `lcb_wait()` and drive IO loop manually.
2858
2859* [major] CCBC-171 Invalid read in libevent plugin, when the plugin
2860  compiled in 1.x mode
2861
2862* [critical] CCBC-155 Observe malfunctions in the case of multiple
2863  keys and server failure
2864
2865* [major] CCBC-156 The ep-engine renders meaningful body for observe
2866  responses only if status code is 0 (`PROTOCOL_BINARY_RESPONSE_SUCCESS`).
2867  We shouldn't interpret response body in other cases, just decode &
2868  failout request instead. Also we shouldn't retry observe commands on
2869  `PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET`, because it can cause the
2870  client to loop infinitely
2871
2872* [major] CCBC-145 KV Durability operation API. Async APIs added to
2873  allow the checking of the durability (replication and persistence)
2874  status of a key, and to notify the user when a specific criteria has
2875  been satisfied.
2876
2877## 2.0.2 (2013-01-04)
2878
2879* [major] CCBC-150 commands sent to multiple servers fail to detect
2880  the respose if mixed with other commands.
2881
2882* [minor] CCBC-143 'cbc version' reports that uses 2.0.0, but really
2883  installed with 2.0.1. Minor but confusing issue.
2884
2885* [major] CCBC-151 Cancellation of the HTTP request might lead to
2886  memory leaks or to segfaults (2e3875c2).
2887
2888* [minor] Document `LCB_SERVER_BUG` and `LCB_PLUGIN_VERSION_MISMATCH`.
2889  Enhance the the `lcb_strerror()` test to detect undocumented error
2890  codes.
2891
2892* [critical] CCBC-153 Under high load the library could generate
2893  `LCB_ETIMEDOUT` errors without reason owing to internal limitations.
2894
2895## 2.0.1 (2012-12-11)
2896
289750 files changed, 1009 insertions(+), 274 deletions(-)
2898
2899* libev-plugin: delay all timers while the loop isn't active. It will
2900  fix `LCB_ETIMEOUT` in the following scenario:
2901
2902  * connect the instance
2903  * sleep for time greater than default timeout (e.g. 3 seconds)
2904  * schedule and execute a command (it will be timed out
2905    immediately)
2906
2907* libev-plugin: reset IO event on delete. We need to reset it,
2908  because it might be re-used later
2909
2910* CCBC-136: do not abort when purging SASL commands
2911
2912* Make library C89 friendly again
2913
2914* CCBC-132, CCBC-133: Ensure HTTP works even when the network may be
2915  unreliable. This changeset encompasses several issues which had been
2916  found with HTTP requests during network errors and configuration
2917  changes. Specifically some duplicate code paths were removed, and
2918  the process for delivering an HTTP response back to the user is more
2919  streamlined.
2920
2921* CCBC-130: Fix a memory leak on the use of http headers
2922
2923* CCBC-131: Compensate for cluster nodes lacking couchApiBase
2924
2925* Fix possible SEGFAULT. Not-periodic timers are destroyed after
2926  calling user's callback, after that library performed read from
2927  freed pointer.
2928
2929* SystemTap and DTrace integration
2930
2931## 2.0.0 (2012-11-27)
2932
293312 files changed, 50 insertions(+), 12 deletions(-)
2934
2935* Install unlock callback in synchronous mode
2936
2937* Add the CAS to the delete callback
2938
2939* Minor update of the packaging layout:
2940
2941  * libcouchbase-all package comes without version
2942  * extract debug symbols from libcouchbase-{bin,core} to
2943    libcouchbase-dbg package
2944
2945## 2.0.0beta3 (2012-11-21)
2946
294764 files changed, 3641 insertions(+), 735 deletions(-)
2948
2949* CCBC-104 Fix illegal memory access. Reconnect config listener if the
2950  config connection was gone without proper shutdown.
2951
2952* Check for EWOULDBLOCK/EINTR on failed send
2953
2954* Allow to use gethrtime() from C++
2955
2956* Fix using freed memory (was introduced in 4397181)
2957
2958* Use dynamic versioning for plugins
2959
2960* Remove libtool version from the plugins
2961
2962* Allow to use 'cbc-hash' with files
2963
2964* CCBC-120 Purge stale OBSERVE packets
2965
2966* CCBC-120 Reformat and refactor `lcb_server_purge_implicit_responses`:
2967
2968  * move packet allocation out of GET handler
2969  * dropping NOOP command shouldn't return error code
2970
2971* CCBC-122 Try to switch another server from backup list on timeout
2972
2973* CCBC-119: Allow the user to specify a different hash key. All of the
2974  data operations contains a hashkey and nhashkey field. This allows
2975  you to "group" items together in your cluster. A typical use case
2976  for this is if you're storing lets say data for a single user in
2977  multiple objects. If you want to ensure that either all or none of
2978  the objects are available if a server goes down, it could be a good
2979  idea to locate them on the same server. Do bear in mind that if you
2980  do try to decide where objects is located, you may end up with an
2981  uneven distribution of the number of items on each node. This will
2982  again result in some nodes being more busy than others etc. This is
2983  why some clients doesn't allow you to do this, so bear in mind that
2984  by doing so you might not be able to get your objects from other
2985  clients.
2986
2987* Create man pages for cbc and cbcrc
2988
2989* CCBC-118 `lcb_error_t` member in the http callbacks shouldn't reflect
2990  the HTTP response code. So the error code will be always `LCB_SUCCESS`
2991  if the library managed to receive the data successfully.
2992
2993* Timer in libev uses double for interval. Ref:
2994  [](http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#code_ev_timer_code_relative_and_opti)
2995
2996* CCBC-115 Return zero from `do_read_data()` if `operations_per_call`
2997  reached. The `operations_per_call' limit was introduced to prevent
2998  from freezing event loop. But in the function variable rv could
2999  store two different results and in case of reaching this limit it is
3000  returning number of the processed records, which is wrong. The
3001  function should return either zero (success) or non-zero (failure).
3002
3003* Do not allow admin operations without authentication
3004
3005* Fix cbc-bucket-create. `sasl-password' is misspelled, and it fails
3006  to parse the command line option.
3007
3008* CCBC-114 Lookup the plugin symbol also in the current executable
3009  image.
3010
3011* CCBC-113 Remove unauthorized asserion (d344037). The
3012  `lcb_server_send_packets()` function later check if the server object
3013  connected and establish connection if not (with raising possible
3014  errors)
3015
3016* Try all known plugins for `LCB_IO_OPS_DEFAULT` in run time
3017
3018* Don't use the `time_t` for win32. When compiling from php it turns out
3019  that it gets another size of the `time_t` type, causing the struct
3020  offsets to differ.
3021
3022* Add `lcb_verify_compiler_setup()`. This function allows the "user" of
3023  the library to verify that the compiler use a compatible struct
3024  packing scheme.
3025
3026* CCBC-87: Add documentation about the error codes
3027
3028## 2.0.0beta2 (2012-10-12)
3029
303081 files changed, 2822 insertions(+), 1353 deletions(-)
3031
3032* Search ev.h also in ${includedir}/libev
3033
3034* Fix SEGFAULT if IO struct is allocated not by the `lcb_create()`
3035
3036* Allow libcouchbase to connect to an instance without specifying bucket. It is useful
3037  when the bucket not needed, e.g. when performing administration
3038  tasks.
3039
3040* Fix memory leak after an unsuccessful connection
3041
3042* Fix invalid memory access in cbc tool. Affected command is
3043  cbc-bucket-create
3044
3045* `lcb_create`: replace `assert()` with error code
3046
3047* CCBC-105 breakout event loop in default `error_callback`. This provides
3048  better default behaviour for users who haven't defined global error
3049  callback.
3050
3051* Allow users to build the library without dependencies. For example,
3052  without plugins at all. This may be useful if the plugin is
3053  implemented by or built into the host application.
3054
3055* Allow users to install both libraries (2.x and 1.x) on the same system.
3056
3057* Make the content type optional for `lcb_make_http_request()`
3058
3059* Fix password memory leak in http.c (7e71493)
3060
3061* Add support for raw http requests. libcouchase already contains all
3062  the bits to execute a raw http request, except for the possibility
3063  to specify a host:port, username and password.
3064
3065* Cleanup HTTP callbacks. Use the same callbacks both for Management
3066  and View commands, and rename them to `lcb_http_complete_callback` and
3067  `lcb_http_data_callback`.
3068
3069* Allow users to use environment variables to pick the event plugin
3070
3071* Add a new interface version for creating IO objects via plugins
3072
3073* Implement a new libev plugin. It is compatible with both libev3 and
3074  libev4.
3075
3076* CCBC-103: Fix linked event/timer lists for win32
3077
3078* Allow to disable CXX targets
3079
3080* `lcb_connect()` should honor the syncmode setting. Automatically call
3081  `lcb_wait()` when in synchronous mode
3082
3083## 2.0.0beta (2012-09-13)
3084
3085123 files changed, 13753 insertions(+), 8264 deletions(-)
3086
3087* Refactor the API. This is a full redesign of the current
3088  libcouchbase API that'll allow us to extend parts of the API without
3089  breaking binary compatibility. Also it renames all functions to have
3090  `lcb_` prefix instead of `libcouchbase_` and `LCB`/`LIBCOUCHBASE` in macros.
3091
3092* Added --enable-fat-binary. Helps to solve issues when linking with
3093  fat binaries on MacOS.
3094
3095* Implement getter for number of nodes in the cluster:
3096  `lcb_get_num_nodes()`
3097
3098* Implement RESTful flush in the cbc toolset
3099
3100* Bundle Windows packages as zip archives
3101
3102* CCBC-98 Differentiate between TMPFAILs. This allows a developer
3103  to know if the temporary condition where the request cannot be
3104  handled is due to a constraint on the client or the server.
3105
3106* Don't try to put the current node last in the backup list. This may
3107  cause "duplicates" in the list if the REST server returns another
3108  name for the server than you used.  Ex: you specify "localhost" and
3109  the REST response contains 127.0.0.1
3110
3111* Fix locking keys in multi-get mode
3112
3113* Fix bug where HTTP method is not set
3114
3115* CCBC-96 Correct buffer length for POST/PUT headers
3116
3117* Add `lcb_get_server_list`
3118
3119* Merge `lcb_get_locked` into `lcb_get` function
3120
3121* Fix Windows build
3122
3123* Include sys/uio.h. Needed by OpenBSD
3124
3125* Fix mingw build (c394a1c)
3126
3127* CCBC-80: Default to IPv4 only
3128
3129* Sync `memcached/protocol_binary.h`. Pull extra
3130  `protocol_binary_datatypes` declarations.
3131
3132* Deliver HTTP headers via callbacks
3133
3134* Unify HTTP interface. This means massive rename of the symbols
3135
3136* CCBC-92 release ringbuffer in `lcb_purge_single_server`
3137
3138* CCBC-91 Fix switching to backup node in case of server outage
3139
3140* CCBC-91 Reset timer for commands with `NOT_MY_VBUCKET` response
3141
3142* Fix alignment for sparc platforms
3143
3144* Fix win32 build (Add strings.h)
3145
3146* Fix build with libyajl available
3147
3148* Bundle libvbucket
3149
3150* Fix a problem with allocating too few slots in the `backup_nodes`. Fixes
3151  illegal memory access.
3152
3153* CCBC-90 Fix initialization of backup nodes array. The code switching
3154  nodes relies on NULL terminator rather than `nbackup_nodes` variable.
3155  Fixes illegal memory access.
3156
3157* CCBC-89: Release the memory allocated by the http parser
3158
3159## 1.0.6 (2012-08-30)
3160
31615 files changed, 18 insertions(+), 5 deletions(-)
3162
3163* CCBC-92 release ringbuffer in `libcouchbase_purge_single_server`
3164
3165## 1.0.5 (2012-08-15)
3166
31676 files changed, 23 insertions(+), 15 deletions(-)
3168
3169* CCBC-91 Fix switching to backup node in case of server outage
3170
3171* CCBC-91 Reset timer for commands with `NOT_MY_VBUCKET` response
3172
3173## 1.1.0dp9 (2012-07-27)
3174
31755 files changed, 18 insertions(+), 11 deletions(-)
3176
3177* Render auth credentials for View requests.
3178  `libcouchbase_make_http_request()` won't accept credentials anymore.
3179  It will pick them bucket configuration.
3180
3181## 1.1.0dp8 (2012-07-27)
3182
318336 files changed, 2093 insertions(+), 704 deletions(-)
3184
3185* Allow the client to specify the verbosity level on the servers using
3186  `lcb_set_verbosity()` function.
3187
3188* Bind timeouts to server sockets instead of commands. This means that
3189  from this point timeout interval will be started from the latest IO
3190  activity on the socket. This is a behavior change from the 1.0 series.
3191
3192* Allow the user to get the number of replicas using
3193  `libcouchbase_get_num_replicas()`
3194
3195* Allow a user to breakout from the event loop in callbacks using
3196  `libcouchbase_breakout()`
3197
3198* Make `libcouchbase_wait()` re-entrable
3199
3200* Let users detect if the event loop running already using
3201  `libcouchbase_is_waiting()` function.
3202
3203* CCBC-77 Use separate error code for ENOMEM on the client
3204
3205* CCBC-82 Implement read replica
3206
3207* CCBC-85 Implement general purpose timers. It is possible for users
3208  to define their own timers using `libcouchbase_timer_create()`
3209  function. (See headers for more info)
3210
3211* Implement multiple timers for windows
3212
3213* CCBC-15 Add OBSERVE command
3214
3215* Allow users to specify content type for HTTP request
3216
3217* Fix to handle the case when View base doesn't have URI schema
3218
3219* Separate HTTP callbacks for couch and management requests
3220
3221* Claim that server has data in buffers if there are HTTP requests
3222  pending. Without this patch the event loop can be stopped
3223  prematurely.
3224
3225* Add new cbc commands and options:
3226
3227  * cbc-view (remove couchview example)
3228  * cbc-verbosity
3229  * cbc-admin
3230  * cbc-bucket-delete
3231  * cbc-bucket-create
3232  * Add -p and -r options to cbc-cp to control persistence (uses
3233    OBSERVE internally)
3234
3235## 1.1.0dp7 (2012-06-19)
3236
323718 files changed, 266 insertions(+), 115 deletions(-)
3238
3239* Add support for notification callbacks for configuration changes.
3240  Now it is possible to install a hook using function
3241  `libcouchbase_set_configuration_callback()`, and be notified about all
3242  configuration changes.
3243
3244* Implement function to execution management requests. Using
3245  `libcouchbase_make_management_request()` function you can configure
3246  the cluster, add/remove buckets, rebalance etc. It behaves like
3247  `libcouchbase_make_couch_request()` but works with another endpoint.
3248
3249* Extract HTTP client. Backward incompatible change in Couchbase View
3250  subsystem
3251
3252## 1.1.0dp6 (2012-06-13)
3253
325420 files changed, 201 insertions(+), 127 deletions(-)
3255
3256* CCBC-70 Close dynamic libraries. Fixes small memory leak
3257
3258* CCBC-72 Fix compilation on macosx with gtest from homebrew
3259
3260* CCBC-71 Implement 'help' command for cbc tool
3261
3262* Undefine NDEBUG to avoid asserts to be optimized out
3263
3264* Fix win32 builds:
3265
3266  * Add suffix to cbc command implementations
3267  * Fix guards for socket errno macros
3268  * Define `size_t` types to fix MSVC 9 build
3269  * MSVC 9 isn't C99, but has stddef.h, so just include it
3270
3271* CCBC-63 Include types definitions for POSIX systems. Fixes C++
3272  builds on some systems.
3273
3274## 1.1.0dp5 (2012-06-06)
3275
32767 files changed, 65 insertions(+), 9 deletions(-)
3277
3278* The library doesn't depend on pthreads (eliminates package lint
3279  warnings)
3280
3281* Implement 'cbc-hash' to match server/vbucket for given key
3282
3283## 1.1.0dp4 (2012-06-05)
3284
32858 files changed, 54 insertions(+), 7 deletions(-)
3286
3287* cbc: strtoull doesn't exist on win32, therefore use C++ equivalent.
3288
3289* integration with Travis-CI
3290
3291## 1.1.0dp3 (2012-06-03)
3292
329354 files changed, 1874 insertions(+), 824 deletions(-)
3294
3295* CCBC-68 Implement `UNLOCK_KEY` (`UNL`) command
3296
3297* CCBC-68 Implement `GET_LOCKED` (`GETL`) command
3298
3299* hashset.c: iterate over whole set on rehashing. Fixes memory leaks
3300  related to hash collisions (905ef95)
3301
3302* Destroy view requests items when server get destroyed
3303
3304* Do not call View callbacks for cancelled requests
3305
3306* Fix `ringbuffer_memcpy()` (36afdb2)
3307
3308* CCBC-62 A hang could occur in `libcouchbase_wait()` after the timeout
3309  period. Check for breakout condition after purging servers
3310
3311* CCBC-65 A small memory leak can occur with frequent calls to
3312  `libcouchbase_create()` and `libcouchbase_destroy()`
3313
3314* CCBC-64. Timeouts can occur during topology changes, rather than be
3315  correctly retried. Send the retry-packet to new server
3316
3317* `vbucket_found_incorrect_master()` returns server index
3318
3319* Fix `ringbuffer_is_continous()`
3320
3321* Pick up cookies from pending buffer unless node connected
3322
3323* RCBC-33 A fix for a buffer overflow with the supplied password as
3324  has been integrated. While it is a buffer overflow issue, this is
3325  not considered to be a possible security issue because the password
3326  to the bucket is not commonly supplied by an untrusted source
3327
3328## 1.0.4 (2012-06-01)
3329
333015 files changed, 330 insertions(+), 76 deletions(-)
3331
3332* CCBC-65 A small memory leak can occur with frequent calls to
3333  `libcouchbase_create()` and `libcouchbase_destroy()`
3334
3335* CCBC-62 A hang could occur in `libcouchbase_wait()` after the timeout
3336  period. Check for breakout condition after purging servers
3337
3338* CCBC-64. Timeouts can occur during topology changes, rather than be
3339  correctly retried. Send the retry-packet to new server
3340
3341* [backport] `vbucket_found_incorrect_master()` returns server index.
3342  (orig: c32fdae)
3343
3344## 1.0.3 (2012-05-02)
3345
33466 files changed, 44 insertions(+), 7 deletions(-)
3347
3348* [backport] Fix `ringbuffer_is_continous()` (orig: 9cfda9d)
3349
3350* [backport] Pick up cookies from pending buffer unless node connected
3351  (orig: 463958d)
3352
3353* RCBC-33 A fix for a buffer overflow with the supplied password as
3354  has been integrated. While it is a buffer overflow issue, this is
3355  not considered to be a possible security issue because the password
3356  to the bucket is not commonly supplied by an untrusted source
3357
3358## 1.1.0dp2 (2012-04-10)
3359
336010 files changed, 54 insertions(+), 20 deletions(-)
3361
3362* CCBC-59 Don't wait for empty buffers. If called with no operations
3363  queued, `libcouchbase_wait()` will block forever. This means that a
3364  single threaded application that calls `libcouchbase_wait()` at
3365  different times to make sure operations are sent to the server runs
3366  the risk of stalling indefinitely. This is a very likely scenario.
3367
3368* Don't define `size_t` and `ssize_t` for VS2008
3369
3370* Fix segfault while authorizing on protected buckets (211bb04)
3371
3372## 1.1.0dp (2012-04-05)
3373
337459 files changed, 4374 insertions(+), 1205 deletions(-)
3375
3376* This release adds new functionality to directly access Couchbase
3377  Server views using the `libcouchbase_make_couch_request()` function.
3378  See the associated documentation and header files for more details
3379
3380* Check for newer libvbucket
3381
3382* MB-4834: Request the tap bytes in a known byte order (adf2b30)
3383
3384## 1.0.2 (2012-03-06)
3385
338683 files changed, 4095 insertions(+), 654 deletions(-)
3387
3388* Implement VERSION command from binary protocol
3389
3390* Allow use of libcouchbase to pure memcached clusters by using
3391  `libcouchbase_create_compat()` function
3392
3393* Always sign deb packages and allow to pass PGP key
3394
3395* Bundle the protocol definitions for memcached
3396  (`memcached/protocol_binary.h` and `memcached/vbucket.h`) to make it
3397  easier to build
3398
3399* Bundle sasl client implementation
3400
3401* Fix windows build for MS Visual Studio 9
3402
3403  * define `E*` if missing
3404  * stdint header
3405
3406* Add support for multiple hosts for the bootstrap URL. A list of
3407  hosts:port separated by ';' to the administration port of the
3408  couchbase cluster. (ex: "host1;host2:9000;host3" would try to
3409  connect to host1 on port 8091, if that fails it'll connect to host2
3410  on port 9000 etc)
3411
3412* Raise error if <stdint.h> missing
3413
3414* Add JSON support for cbc-cp command
3415
3416* Add option to set timeout for cbc
3417
3418* Added support for '-' to cp
3419
3420* Added cbc-verify: verify content in cache with files
3421
3422* Now cbc supports better usage messages
3423
3424## 1.0.1 (2012-02-13)
3425
342665 files changed, 3275 insertions(+), 1329 deletions(-)
3427
3428* CCBC-38 Use alternate nodes when current is dead. A fix to allow the
3429  client library to failover automatically to other nodes when the
3430  initial bootstrap node becomes unavailable has been added. All users
3431  are recommended to upgrade for this fix.
3432
3433* Fix connect timeouts. Timeouts are per-operation and only set if
3434  there is any I/O. The special exception to this is initial
3435  connections, which do not necessarily have a data stream or write
3436  buffer associated wiht them yet.
3437
3438* Update to new MT-safe libvbucket API
3439
3440* Add option for embedding libevent IO plugin
3441
3442* Fix multi-{get,touch} requests handling when nkeys > 1
3443
3444* Allow to build without tools which require C++ compiler
3445
3446* Destroy event base if we created it
3447
3448* CCBC-51 Check server index before using
3449
3450* Handle `PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET` and retry it until
3451  success or another error, which can be handled by caller
3452
3453* Do not attempt SASL when SASL already in progress
3454
3455* Finer grained error reporting for basic REST errors:
3456
3457  * return `LIBCOUCHBASE_AUTH_ERROR` on HTTP 401
3458  * return `LIBCOUCHBASE_BUCKET_ENOENT` on HTTP 404
3459  * event loop is stopped (via `maybe_breakout`) on REST error
3460
3461* Fixed segfaults and memory access errors on libevent1.4
3462
3463* Allow for notification on initial vbucket config. This makes
3464  libcouchbase `stop_event_loop` and libcouchbase maybe breakout work
3465  properly in cooperative asynchronous event loops. the wait flag is
3466  set by `libcouchbase_wait()` and unset by `maybe_breakout`.
3467  Additionally, `breakout_vbucket_state_listener` will call
3468  `maybe_breakout` as well, instead of having synchronous behavior
3469  assumed by `libcouchbase_wait()`
3470
3471* Fix `sasl_list_mech_response_handler()`. `sasl_client_start()` expects
3472  null-terminated string
3473
3474* Refactor: use `libcouchbase_xxxx` for the datatypes
3475
3476* Do not notify user about the same error twice. Use command callback
3477  when it's possible. (e.g. where the `libcouchbase_server_t` is
3478  accessible and we can `libcouchbase_failout_server()`)
3479
3480* Install configuration.h for win32
3481
3482* CCBC-20 Implement operation timeouts. Timeouts applies for all
3483  operations, and the timer starts running from the moment you call
3484  the libcouchbase operation you want. The timer includes times for
3485  connect/send/ receive, and all of the time our application spend
3486  before letting the event loop call callbacks into libcouchbase.
3487
3488* Fix double free() error when reading key from packet in handler.c
3489  (b5d485a)
3490
3491## 1.0.0 (2012-01-22)
3492
3493170 files changed, 6048 insertions(+), 7553 deletions(-)
3494
3495* Allow the user to specify sync mode on an instance
3496
3497* Empty string as bucket name should be treated as NULL
3498
3499* Bail out if you can't find memcached/vbucket.h and
3500  libvbucket/vbucket.h
3501
3502* New command cbc. This command intended as the analog of `mem*`
3503  tools from libmemcached distribution. Supported commands:
3504
3505  * cbc-cat
3506  * cbc-cp
3507  * cbc-create
3508  * cbc-flush
3509  * cbc-rm
3510  * cbc-stats
3511  * cbc-send
3512  * cbc-receive
3513
3514* CCBC-37 allow config for cbc tool to be read from .cbcrc
3515
3516* Convert flags to network byte order
3517
3518* Remove <memcached/vbucket.h> dependency
3519
3520* Use the error handler instead of printing to stderr
3521
3522* Disable Views code
3523
3524* Don't accept NULL as a valid "callback"
3525
3526* Add make targets to build RPM and DEB packages
3527
3528* Allow download memcached headers from remote host
3529
3530* Added docbook-based manual pages
3531
3532* Gracefully update vbucket configuration. This means that the
3533  connection listener, could reconfigure data sockets on the fly
3534
3535* Allow libcouchbase build with libevent 1.x (verified for 1.4.14)
3536
3537* Aggregate flush responses
3538
3539* Add stats command
3540
3541## 0.3.0 (2011-11-02)
3542
3543102 files changed, 6188 insertions(+), 1531 deletions(-)
3544
3545* Add flush command from binary protocol
3546
3547* Remove packet filter
3548
3549* Use ringbuffers instead `buffer_t`
3550
3551* Win32 build fixes
3552
3553* Allow to specify IO framework but using IO plugins
3554
3555* CCBC-11 The interface to access views
3556
3557* Initial man pages
3558
3559* Extend the test suite
3560
3561## 0.2.0 (2011-09-01)
3562
356385 files changed, 12144 insertions(+)
3564
3565* Simple bootstapping which builds HTTP packet and listens
3566  /pools/default/buckets/BUCKETNAME directly. Allowed usage of
3567  defaults (bucket name, password)
3568
3569* Support basic set of binary protocol commands:
3570
3571  * get (get and touch)
3572  * set
3573  * increment/decrement
3574  * remove
3575  * touch
3576
3577* MB-3294 Added `_by_key` functions
3578
3579* CCBC-5 Fixed abort in `do_read_data` (c=0x7b09bf0) at src/event.c:105
3580
3581* Added timings API. It might be possible to turn on timing collection
3582  using `libcouchbase_enable_timings()`/`libcouchbase_disable_timings()`,
3583  and receive the data in timings callback.
3584
3585* Basic TAP protocol implementation
3586
3587* Initial win32 support
3588