Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions osbenchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,10 @@ def add_workload_source(subparser):
help=f"Define a comma-separated list of client options to use. The options will be passed to the OpenSearch "
f"Python client (default: {opts.ClientOptions.DEFAULT_CLIENT_OPTIONS}).",
default=opts.ClientOptions.DEFAULT_CLIENT_OPTIONS)
test_run_parser.add_argument(
"--database-type",
help="Define the target database type (default: opensearch). Supported types: opensearch, vespa, milvus.",
default="opensearch")
test_run_parser.add_argument("--on-error",
choices=["continue", "abort"],
help="Controls how OSB behaves on response errors (default: continue).",
Expand Down Expand Up @@ -1141,6 +1145,7 @@ def configure_test(arg_parser, args, cfg):
cfg.add(config.Scope.applicationOverride, "workload", "randomization.alpha", args.randomization_alpha)
cfg.add(config.Scope.applicationOverride, "workload", "visualize", args.visualize)
cfg.add(config.Scope.applicationOverride, "workload", "visualize.output.path", args.visualize_output_path)
cfg.add(config.Scope.applicationOverride, "database", "type", args.database_type)
configure_workload_params(arg_parser, args, cfg)
configure_connection_params(arg_parser, args, cfg)
configure_telemetry_params(args, cfg)
Expand Down
12 changes: 8 additions & 4 deletions osbenchmark/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
import urllib3
from urllib3.util.ssl_ import is_ipaddress

import grpc
from opensearch.protobufs.services.document_service_pb2_grpc import DocumentServiceStub
from opensearch.protobufs.services.search_service_pb2_grpc import SearchServiceStub

from osbenchmark.kafka_client import KafkaMessageProducer
from osbenchmark import exceptions, doc_link, async_connection
from osbenchmark.context import RequestContextHolder
Expand Down Expand Up @@ -303,6 +299,14 @@ def create_grpc_stubs(self):
Create gRPC service stubs.
Returns a dict of {cluster_name: {service_name: stub}} structure.
"""
# Import grpc and protobuf stubs lazily — loading the grpc C extension
# initializes background threads. If that happens in the main process
# before Thespian forks actor children, the forked processes inherit
# broken gRPC thread state and may deadlock.
import grpc # pylint: disable=import-outside-toplevel
from opensearch.protobufs.services.document_service_pb2_grpc import DocumentServiceStub # pylint: disable=import-outside-toplevel
from opensearch.protobufs.services.search_service_pb2_grpc import SearchServiceStub # pylint: disable=import-outside-toplevel

stubs = {}

if len(self.grpc_hosts.all_hosts.items()) > 1:
Expand Down
71 changes: 0 additions & 71 deletions osbenchmark/database/__init__.py

This file was deleted.

7 changes: 0 additions & 7 deletions osbenchmark/database/clients/__init__.py

This file was deleted.

7 changes: 0 additions & 7 deletions osbenchmark/database/clients/milvus/__init__.py

This file was deleted.

25 changes: 0 additions & 25 deletions osbenchmark/database/clients/milvus/milvus.py

This file was deleted.

11 changes: 0 additions & 11 deletions osbenchmark/database/clients/opensearch/__init__.py

This file was deleted.

Loading
Loading