mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-11 15:55:12 +02:00
fix: wire replication params through YAML/params path for Cassandra and Qdrant
resolve_cassandra_config did not accept replication_factor as a kwarg, so cassandra_replication_factor from YAML params was silently ignored by all 6 callers. Add the kwarg and pass it from every caller. Same fix for Qdrant: 3 writers now pass qdrant_replication_factor and qdrant_shard_number from params. Add tests covering the params path for both helpers.
This commit is contained in:
parent
4913f8c2eb
commit
0f7cfa2170
13 changed files with 214 additions and 28 deletions
|
|
@ -83,7 +83,8 @@ class Processor(AsyncProcessor):
|
|||
host=cassandra_host,
|
||||
username=cassandra_username,
|
||||
password=cassandra_password,
|
||||
default_keyspace="config"
|
||||
default_keyspace="config",
|
||||
replication_factor=params.get("cassandra_replication_factor"),
|
||||
)
|
||||
|
||||
# Store resolved configuration
|
||||
|
|
|
|||
|
|
@ -61,7 +61,8 @@ class Processor(WorkspaceProcessor):
|
|||
host=cassandra_host,
|
||||
username=cassandra_username,
|
||||
password=cassandra_password,
|
||||
default_keyspace="knowledge"
|
||||
default_keyspace="knowledge",
|
||||
replication_factor=params.get("cassandra_replication_factor"),
|
||||
)
|
||||
|
||||
self.cassandra_host = hosts
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ class Processor(AsyncProcessor):
|
|||
username=cassandra_username,
|
||||
password=cassandra_password,
|
||||
default_keyspace="iam",
|
||||
replication_factor=params.get("cassandra_replication_factor"),
|
||||
)
|
||||
|
||||
self.cassandra_host = hosts
|
||||
|
|
|
|||
|
|
@ -146,7 +146,8 @@ class Processor(WorkspaceProcessor):
|
|||
host=cassandra_host,
|
||||
username=cassandra_username,
|
||||
password=cassandra_password,
|
||||
default_keyspace="librarian"
|
||||
default_keyspace="librarian",
|
||||
replication_factor=params.get("cassandra_replication_factor"),
|
||||
)
|
||||
|
||||
# Store resolved configuration
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ class Processor(DocumentEmbeddingsQueryService):
|
|||
api_key = params.get("api_key")
|
||||
|
||||
url, api_key, _, _ = resolve_qdrant_config(
|
||||
url=store_uri, api_key=api_key,
|
||||
url=store_uri,
|
||||
api_key=api_key,
|
||||
)
|
||||
|
||||
super(Processor, self).__init__(
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ class Processor(CollectionConfigHandler, DocumentEmbeddingsStoreService):
|
|||
|
||||
url, api_key, replication_factor, shard_number = resolve_qdrant_config(
|
||||
url=store_uri, api_key=api_key,
|
||||
replication_factor=params.get("qdrant_replication_factor"),
|
||||
shard_number=params.get("qdrant_shard_number"),
|
||||
)
|
||||
|
||||
super(Processor, self).__init__(
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ class Processor(CollectionConfigHandler, GraphEmbeddingsStoreService):
|
|||
|
||||
url, api_key, replication_factor, shard_number = resolve_qdrant_config(
|
||||
url=store_uri, api_key=api_key,
|
||||
replication_factor=params.get("qdrant_replication_factor"),
|
||||
shard_number=params.get("qdrant_shard_number"),
|
||||
)
|
||||
|
||||
super(Processor, self).__init__(
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ class Processor(FlowProcessor):
|
|||
host=params.get("cassandra_host"),
|
||||
username=params.get("cassandra_username"),
|
||||
password=params.get("cassandra_password"),
|
||||
default_keyspace='knowledge'
|
||||
default_keyspace='knowledge',
|
||||
replication_factor=params.get("cassandra_replication_factor"),
|
||||
)
|
||||
|
||||
super(Processor, self).__init__(
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ class Processor(CollectionConfigHandler, FlowProcessor):
|
|||
|
||||
url, api_key, replication_factor, shard_number = resolve_qdrant_config(
|
||||
url=store_uri, api_key=api_key,
|
||||
replication_factor=params.get("qdrant_replication_factor"),
|
||||
shard_number=params.get("qdrant_shard_number"),
|
||||
)
|
||||
|
||||
super(Processor, self).__init__(
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ class Processor(CollectionConfigHandler, FlowProcessor):
|
|||
hosts, username, password, keyspace, replication_factor = resolve_cassandra_config(
|
||||
host=cassandra_host,
|
||||
username=cassandra_username,
|
||||
password=cassandra_password
|
||||
password=cassandra_password,
|
||||
replication_factor=params.get("cassandra_replication_factor"),
|
||||
)
|
||||
|
||||
# Store resolved configuration with proper names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue