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