Skip to content

Commit df87d87

Browse files
committed
fix(migration): propagate redis_url through batch executor
BatchMigrationExecutor.apply/resume accepted num_workers but only forwarded redis_client into the single-index executor. The multi-worker quantization path in MigrationExecutor.apply requires redis_url so each worker can open its own connection, and raises ValueError when it is None. As a result rvl migrate batch-apply --workers >1 against a quantizing index would fail before doing any work. Thread redis_url through _migrate_single_index and into self._single_executor.apply so the batch path now matches the single-index contract.
1 parent f99c2f4 commit df87d87

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

redisvl/migration/batch_executor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def apply(
129129
index_name=index_name,
130130
batch_plan=batch_plan,
131131
report_dir=report_path,
132+
redis_url=redis_url,
132133
redis_client=client,
133134
backup_dir=backup_dir,
134135
batch_size=batch_size,
@@ -226,6 +227,7 @@ def _migrate_single_index(
226227
batch_plan: BatchPlan,
227228
report_dir: Path,
228229
redis_client: Any,
230+
redis_url: Optional[str] = None,
229231
backup_dir: Optional[str] = None,
230232
batch_size: int = 500,
231233
num_workers: int = 1,
@@ -242,6 +244,7 @@ def _migrate_single_index(
242244
# Execute migration
243245
report = self._single_executor.apply(
244246
plan,
247+
redis_url=redis_url,
245248
redis_client=redis_client,
246249
backup_dir=backup_dir,
247250
batch_size=batch_size,

0 commit comments

Comments
 (0)