Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to the default connection class to address slower connection with RequestsHttpConnection #411

Merged
merged 3 commits into from
Nov 20, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions osbenchmark/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ def create(self):
credentials = Credentials(access_key=self.aws_log_in_dict["aws_access_key_id"],
secret_key=self.aws_log_in_dict["aws_secret_access_key"],
token=self.aws_log_in_dict["aws_session_token"])
aws_auth = opensearchpy.AWSV4SignerAuth(credentials, self.aws_log_in_dict["region"],
aws_auth = opensearchpy.Urllib3AWSV4SignerAuth(credentials, self.aws_log_in_dict["region"],
self.aws_log_in_dict["service"])
return opensearchpy.OpenSearch(hosts=self.hosts, use_ssl=True, verify_certs=True, http_auth=aws_auth,
connection_class=opensearchpy.RequestsHttpConnection)
connection_class=opensearchpy.Urllib3HttpConnection)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this is now the default and you could remove this option if you want to. Doesn't hurt to keep it either.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @dblock , so if we just use opensearch-py-2.4.1 then we don't need to explicitly specify connection_class parameter?

Copy link
Member

@dblock dblock Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but specifying it explicitly doesn't hurt.


def create_async(self):
# pylint: disable=import-outside-toplevel
Expand Down
Loading