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