Skip to content

Conversation

@Akhil-Pathivada
Copy link
Contributor

Summary

This PR adds version compatibility to the OpenSearch client, allowing it to work correctly with both OpenSearch 2.x and 3.x clusters. It resolves a critical issue where 3.x-specific index settings were being sent to 2.x clusters, causing index creation to fail.

Changes

  • Added robust version detection using the .info() API and the packaging library for accurate semantic version comparisons.
  • Implemented an extensible, declarative registry (VERSION_SPECIFIC_SETTING_RULES) to apply only compatible settings based on the detected cluster version.
  • Established a "Fail-Fast" error handling strategy that raises an exception if the cluster version cannot be determined, preventing ambiguous states.

Files Modified

  • vectordb_bench/backend/clients/oss_opensearch/oss_opensearch.py
  • install/requirements_py3.11.txt

Key Features

Backward Compatible: Now works with OpenSearch 2.x clusters.
Future-Proof: The new design makes it trivial to add rules for future OpenSearch versions.
Robust Error Handling: Prevents ambiguous states by failing fast if the cluster version is unknown.

@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Akhil-Pathivada
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Akhil-Pathivada
Copy link
Contributor Author

/assign @alwayslove2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants