opensearch-go v4.8.3
CRITICAL UPGRADE RELEASE NOTE - v5 has substantially expanded error handling capabilities compared to v4.
v5 is the current major version, and v4 is in maintenance mode. v4.8.3 is a maintenance release: it does not add features. The v4 -> v5 upgrade changes runtime error-handling behavior and is NOT a drop-in replacement across major versions. If you use this client, read this now - even if you are only upgrading to v4.8.3.
v4 only returns transport-level errors; partial failures (e.g. failed bulk items, failed shards, unconfirmed replica writes) are reported inside the response body, not as Go
errorvalues. In v5, those partial failures are returned as errors by default. Code that compiles and passes against v4 can behave differently against v5 without any code change.Upgrading between v4 releases (any
<v4.8.3to anyv4.X.X) does not change the default error-handling semantics. Seeguides/error_handling.mdfor how to adopt the v5 behavior on v4 before you upgrade, and the v4 to v5 migration guide for the full API delta.
v4.8.3 is a patch on top of v4.8.2. It fixes a panic in NewBulkIndexer when its context is already cancelled, and backports the discovery fix from v5.2.2 that stops fetching routing metadata for indexes the client never uses.
Full Changelog: v4.8.2...v4.8.3
Fixes
- fix(opensearchutil):
NewBulkIndexerpanicked withsync: negative WaitGroup counterwhenBulkIndexerConfig.Contextwas already cancelled andNumWorkerswas more than 1. Workers are now added to the WaitGroup before they start. Reported by @gregfurman in #1392. By @RClaudiuM in #1393 - fix(opensearchtransport): discovery requested routing metadata on every cycle for indexes the client had never used. It now fetches metadata only for indexes the client has sent a request to by name. A client that only searches wildcard patterns such as
logs-*no longer sends these requests. By @ryanyuan in #1395, backported in #1398
Dependencies
- Bump
github.com/aws/aws-sdk-go-v2from 1.48.0 to 1.48.2,aws-sdk-go-v2/configfrom 1.33.18 to 1.33.23 andaws-sdk-go-v2/credentialsfrom 1.21.0 to 1.21.5 (#1383, #1387, #1403, #1410) - Bump
github.com/wI2L/jsondifffrom 0.7.1 to 0.7.2 (#1400)
See CHANGELOG.md for the full list.
Contributors
Thanks to everyone who contributed to this release: @RClaudiuM, @sean- and @ryanyuan.
Thanks to @gregfurman for reporting the NewBulkIndexer panic.