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:
Cyber MacGeddon 2026-06-04 12:34:33 +01:00
parent 4913f8c2eb
commit 0f7cfa2170
13 changed files with 214 additions and 28 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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__(

View file

@ -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__(

View file

@ -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__(

View file

@ -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__(

View file

@ -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__(

View file

@ -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