You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,13 +236,15 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
236
236
237
237
### Removed
238
238
239
+
-**BREAKING**: Remove the `IncludeDedicatedClusterManagers` config flag from `opensearch.Config` and `opensearchtransport.Config`. Dedicated cluster managers (`cluster_manager` role with no work roles) are now unconditionally excluded from request routing: they are kept in the connection inventory for discovery reuse/eviction but never selected for query traffic (a user-supplied seed remains selectable so discovery can bootstrap against it). The flag previously defaulted to excluding them; opting them into routing is no longer supported. Delete any `IncludeDedicatedClusterManagers` field from your config (it is a compile error otherwise) ([#1004](https://github.com/opensearch-project/opensearch-go/pull/1004))
239
240
- Remove deprecated `(*opensearch.Client).Perform` and `(*opensearchtransport.Transport).Perform`; `Stream(*http.Request) (*http.Response, error)` is now the sole method on `opensearchtransport.Interface`. Custom transport implementations must implement `Stream` instead of `Perform`. The `opensearch.Streamer` opt-in interface and `opensearch.ErrTransportMissingMethodStream` sentinel are removed. ([#872](https://github.com/opensearch-project/opensearch-go/issues/872))
240
241
-**BREAKING**: Remove the `EnableMetrics` config flag from `opensearch.Config` and `opensearchtransport.Config`. The detailed-metrics snapshot (per-connection enumeration, per-policy breakdowns, and router cache state) is now always available; `Metrics()` returns the full snapshot unconditionally. The flag's only remaining purpose after [#891](https://github.com/opensearch-project/opensearch-go/issues/891) was to gate the detailed path, which now does its work lazily and lock-free at call time and so costs nothing until `Metrics()` is called. Delete any `EnableMetrics` field from your config (it is a compile error otherwise); see [`UPGRADING_V5.md`](UPGRADING_V5.md#enablemetrics-removed). ([#892](https://github.com/opensearch-project/opensearch-go/issues/892))
241
242
- Remove backport.yml and dependabot_pr.yml as we are not using backport app anymore
242
243
- Stop emitting `opensearchapi.Client` sub-client fields that have no operations routed to them. `cmd/osgen` now emits a sub-client only when at least one operation targets it, dropping the previously-empty `Script`, `ComponentTemplate`, `IndexTemplate`, `Template`, and `DataStream` fields. Index-template and data-stream operations are reached through `client.Indices.*` (e.g. `client.Indices.PutIndexTemplate`, `client.Indices.CreateDataStream`); stored-script operations remain top-level on `Client`
243
244
244
245
### Fixed
245
246
247
+
- Fix an unbounded connection/heap leak in node discovery when the cluster has a dedicated cluster manager (`cluster_manager` role with no work roles). The node was filtered out of the `allConns` inventory while the router received the unfiltered added/removed diffs, so `findConnectionByURL` never matched it: a new `*Connection` was created every discovery cycle and the stale one was never evicted, accumulating without bound in the round-robin fallback pool whose `checkDead` health checks repopulated a per-connection `poolRegistry` `sync.Map` each cycle (leak rate scaled with discovery frequency). `allConns` is now the full connection inventory so discovery reuses and evicts symmetrically, and dedicated cluster managers are excluded at request-routing selection instead: `RoundRobinPolicy` skips them in its `DiscoveryUpdate` add path and `multiServerPool.Next()` skips non-seed dedicated cluster managers during selection (including the no-router fallback). A user-supplied seed is exempt, so discovery still bootstraps against a dedicated cluster manager seed. See also the `IncludeDedicatedClusterManagers` removal under Removed ([#1004](https://github.com/opensearch-project/opensearch-go/pull/1004))
246
248
- Fix `cmd/osgen` silently dropping typed structs on Go type-name collisions, and add a completeness guard so future collisions fail generation instead of degrading output. Two distinct spec schemas that derived the same Go name were reduced to one by the type registry, dropping the other to raw `json.RawMessage` (or mis-typing a field): the search `profile` container collided with the per-search `SearchProfile` item, and multiple response bodies in the `flow_framework.common` and `security_analytics.findings` groups all derived `<Group>Resp`. Colliding refs are now disambiguated via documented override tables (`typeNameCollisions` / `respTypeNameCollisions`), and a panic-guard requires any new colliding ref to be enumerated. Regenerating restores typed responses for the affected operations (e.g. flow_framework `search`/`search_state`, security_analytics `search_finding_correlations`, and the search response's `profile` field), and a response schema also referenced structurally (a search hit's `_source`) is now emitted as a standalone type instead of dangling ([#989](https://github.com/opensearch-project/opensearch-go/pull/989))
247
249
- Fix plugin dispatch methods discarding the transport response, leaving `Inspect().Response` nil on every typed plugin response. The generated plugin dispatch template dropped the `*opensearch.Response` returned by `request()` (`if _, err := request(...)`); it now assigns it (`resp.response, err = request(...)`), matching the core client. Also serialize the discovery-path warmup recalculation and ready-list partitioning in `createOrUpdateMultiNodePoolWithLock` under the pool write lock -- `recalculateWarmupParamsWithLock`/`getWarmupParamsWithLock` (renamed to reflect the requirement) and the `mu.activeCount` write touched `mu`-guarded fields without holding `pool.mu`, racing `resurrectWithLock` (follow-up to [#981](https://github.com/opensearch-project/opensearch-go/pull/981)) ([#989](https://github.com/opensearch-project/opensearch-go/pull/989))
248
250
- Fix node discovery hijacking the request stream with unverified, unreachable discovered nodes and masking the user-supplied seed-URL fallback. When discovered `publish_address` values are unroutable from the client (NAT'd or misconfigured clusters, e.g. a Kubernetes stack cluster in CI), a freshly discovered but never-health-checked node could be served to requests as a zombie -- failing every request with `no route to host` -- instead of returning `ErrNoConnections` and cascading to the reachable seed URL. Connections are now considered available for routing only when they are a user-supplied seed (assumed reachable) or a discovered node confirmed reachable, and every routing policy and pool (round-robin, role, coordinator, index/doc router, single-server, and multi-server pools) consistently honors that gate on both the enabled-bit and connection-selection paths, so the seed fallback serves requests until a discovered node health-checks clean ([#952](https://github.com/opensearch-project/opensearch-go/pull/952), [#954](https://github.com/opensearch-project/opensearch-go/pull/954), [#956](https://github.com/opensearch-project/opensearch-go/pull/956))
0 commit comments