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