|
1 | 1 | # Release Notes |
2 | 2 |
|
| 3 | +# 3.3.19 (2026-05-13) |
| 4 | + |
| 5 | +* CCBC-1685: Add `lcb_trim_memory()` to release cached pool memory. |
| 6 | + Long-lived instances that occasionally burst and then idle retain the |
| 7 | + peak working set of every pipeline's internal allocator until |
| 8 | + `lcb_destroy()`. In memory-constrained environments (containers, tight |
| 9 | + cgroup limits) this plateau is easily mistaken for a leak and can |
| 10 | + trigger the OOM killer once several instances are stacked in one |
| 11 | + process. The new API releases the backing buffers of cached blocks |
| 12 | + without touching in-flight operations or connections. Intended for |
| 13 | + periodic invocation from an application's idle tick when RSS |
| 14 | + approaches a configured limit. |
| 15 | + |
| 16 | +* CCBC-1702: Requeue operations when the vBucket map briefly has no |
| 17 | + master. During failover, rebalance, and the moment a new |
| 18 | + configuration is being installed the vbmap can transiently show no |
| 19 | + master for a vBucket. Previously such operations failed immediately |
| 20 | + with `LCB_ERR_NO_MATCHING_SERVER`; they are now retried until the |
| 21 | + operation deadline expires, matching the contract customers expect |
| 22 | + during topology changes. Opt-out remains available via |
| 23 | + `retry=missingnode=0`. This change also closes several latent |
| 24 | + use-after-free races on the configuration-replacement path that the |
| 25 | + longer retry window made reachable. |
| 26 | + |
| 27 | +* CCBC-1699, CCBC-1695, CCBC-1694: Fix TLS + `libuv` crashes and hangs |
| 28 | + around instance teardown and live configuration updates. Pre-fix |
| 29 | + symptoms included `SIGABRT` in the SSL context destructor on |
| 30 | + Couchbase Server 7.6 and 6.6, a deadlock in `lcb_destroy()` that |
| 31 | + prevented async-destroy callbacks from firing, and a use-after-free |
| 32 | + crash during rebalance and failover against CBS 6.0.x under TLS. The |
| 33 | + libuv I/O plugin now caps its teardown drain and force-closes |
| 34 | + orphaned timers and sockets so `lcb_destroy_io_ops()` no longer |
| 35 | + hangs or asserts on `uv_loop_close`. |
| 36 | + |
| 37 | +* CCBC-1686, CCBC-1687, CCBC-1692: Harden the `conn-state-invalidated` |
| 38 | + error path. A server-side error carrying this errmap attribute |
| 39 | + (e.g. `EINTERNAL` 0x84) could leave the client exposed to a |
| 40 | + destroy/refresh race that crashed on Windows IOCP and was a latent |
| 41 | + use-after-free on Linux. Configuration providers are now paused |
| 42 | + synchronously at the start of `lcb_destroy()`, and an inverted |
| 43 | + guard in the error handler that could deliver `LCB_SUCCESS` to |
| 44 | + user callbacks (or clobber a more specific status with |
| 45 | + `LCB_ERR_GENERIC`) has been corrected. |
| 46 | + |
| 47 | +* CCBC-1688: Fix use-after-free in the threshold-logging tracer. |
| 48 | + Host and port tags attached to a span used to point into the owning |
| 49 | + socket's connection info, which could be freed before the span was |
| 50 | + finished — for example when a sockpool entry was torn down by its |
| 51 | + timer while the outer HTTP/View request was still draining. The |
| 52 | + tracer now copies these short strings. |
| 53 | + |
| 54 | +* CCBC-1684: Preserve the `deadline >= start` invariant when an |
| 55 | + operation is re-stamped at flush time. With |
| 56 | + `LCB_CNTL_RESET_TIMEOUT_ON_WAIT` enabled and a short per-op timeout, |
| 57 | + the flush callback could produce a packet with `start > deadline` |
| 58 | + and abort the process via an assertion on the next `lcb_wait()`. |
| 59 | + Both fields are now rebased to flush time, preserving the remaining |
| 60 | + timeout budget. |
| 61 | + |
| 62 | +* Fix packet replacement and memory management in the retry queue. |
| 63 | + When a collection is being flushed and packets are renewed in |
| 64 | + place, the old packet's bytes can still be referenced by the |
| 65 | + netbuf PDU queue or an in-flight kernel write. The new |
| 66 | + `MCREQ_F_REPLACED` flag lets the retry path safely replace such |
| 67 | + packets without freeing memory that is still on the wire. |
| 68 | + |
| 69 | +* CCBC-1693: Avoid copying the cached collection path on every KV |
| 70 | + response. `CollectionCache::id_to_name` now returns a stable |
| 71 | + reference into the cache instead of a fresh `std::string`, |
| 72 | + eliminating a per-reply allocation for collection paths longer |
| 73 | + than the small-string optimisation threshold. |
| 74 | + |
| 75 | +* CCBC-1682: Fix Analytics discovery with Alternate Addresses. When |
| 76 | + connecting to Couchbase Operational or Enterprise Analytics using |
| 77 | + `LCB_TYPE_CLUSTER`, the client used `/poolsStreaming/default`, |
| 78 | + which returns a legacy configuration without `nodesExt` and |
| 79 | + triggers the 2.x parser fallback. As a result the Analytics |
| 80 | + service was not discovered, alternate addresses were ignored, and |
| 81 | + callers saw `LCB_ERR_UNSUPPORTED_OPERATION`. The cluster-level |
| 82 | + HTTP bootstrap now uses `/pools/default/nodeServicesStreaming`. |
| 83 | + |
| 84 | +* CCBC-1678: Deprecate the Views (Map-Reduce) API in public headers. |
| 85 | + Couchbase Server 7.0 deprecated the Views service in favour of the |
| 86 | + Query Service (SQL++). All public view entry points now emit |
| 87 | + `-Wdeprecated-declarations` at call sites with a guiding message. |
| 88 | + ABI is preserved; existing binaries continue to link and run. |
| 89 | + Translation units that legitimately use the Views API can opt out |
| 90 | + by predefining `LCB_DEPRECATE_VIEWS(X)` before including |
| 91 | + `couchbase.h`. |
| 92 | + |
| 93 | +* Honor `op->trytime` strictly when flushing scheduled retries. |
| 94 | + The previous 5 ms early-fire window could let a retry land below |
| 95 | + the errmap retry-spec's documented "wait at least N ms before the |
| 96 | + first retry" floor, observable on slower CI runners. |
| 97 | + |
| 98 | +* CCBC-1689, CCBC-1690, CCBC-1691: Stabilise the test suite around |
| 99 | + failover/replica-read, libuv-specific timer races, and slow |
| 100 | + Windows Debug bootstrap. SDK behaviour is unchanged. |
| 101 | + |
3 | 102 | # 3.3.18 (2025-09-10) |
4 | 103 |
|
5 | 104 | * CCBC-1672: Fixed protocol violation on new connections. |
|
0 commit comments