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