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