ADR: TPC-DI Enhanced Parallel Surface — Remove the Second Scheduler
Status
Accepted. Settles the TPC-DI part of the review of documented but unimplemented surfaces; the admin and explorer surfaces are out of scope.
Date
2026-09-19
Context
After the parallel phase was made to report failures truthfully, the TPC-DI tree carries two parallel-execution stories:
-
Canonical path.
TPCDIBenchmark(enable_parallel: bool, max_workers: int)drivesrun_etl_pipeline, whose_transform_source_data_parallelexecutes real per-file transforms (_transform_csv_file,_transform_xml_file,_transform_fixed_width_file,_transform_json_file— genuine pandas transforms with defined inputs, outputs, and staged-data accumulation) concurrently through aThreadPoolExecutorsized bymax_workers. The exportedTPCDIETLPipeline(benchbox/core/tpcdi/etl/pipeline.py) provides the historical/incremental/SCD orchestration over real backends. -
Enhanced parallel surface.
run_enhanced_etl_pipelinePhase 3 (_run_parallel_batch_processing) submits three tasks toParallelBatchProcessor(benchbox/core/tpcdi/etl/parallel_batch_processor.py, ~900 lines: dependency scheduler, worker pools, retry machinery) whose task functions only echo their input counts back:{"batch_type": ..., "records": data.get("records", 0), "processed": True}. No task reads, transforms, or writes any data. The phase reportsbatches_processedandworkers_usedfor work that never happened.
Caller inventory (2026-09-19): the scheduler is imported only by
benchbox/core/tpcdi/benchmark.py and its dedicated unit tests; the
enhanced pipeline is invoked only by integration and performance tests.
No CLI command, MCP tool, or documented public import (etl/__init__.py
does not export the scheduler) reaches either. There is no benchmark
evidence that the canonical path cannot meet a parallel-ETL requirement —
no measured gap, no maintenance owner, no performance budget for a second
scheduler.
The deployment guide compounds the confusion: its parallel_processing:
YAML block (mode: adaptive, workload_type, enable_parallel_etl,
enable_parallel_extract, …) names knobs no loader or config class
consumes (TPCDIConfig carries only enable_parallel, max_workers,
chunk_size, and siblings), teaching readers a surface that cannot run.
Decision
Remove the second scheduler; parallel ETL lives in the canonical flags.
- Delete
benchbox/core/tpcdi/etl/parallel_batch_processor.py(ParallelBatchProcessor,BatchProcessingTask,ParallelProcessingConfig, and supporting machinery). - Remove Phase 3 (
_run_parallel_batch_processing) fromrun_enhanced_etl_pipelineand theenable_parallel_processingparameter that existed only to gate it. The remaining phases (FinWire/CustomerMgmt processing, SCD Type 2, incremental loading, quality monitoring) are real and stay. - Parallel TPC-DI ETL is
TPCDIConfig(enable_parallel=True, max_workers=N)on the canonicalrun_etl_pipelinepath. That is the migration: there is nothing to port, because the removed phase never performed ETL. - Correct the deployment guide’s
parallel_processing:YAML block to the realTPCDIConfigfields and document the canonical flags as the parallel interface.
No beta compatibility cycle applies: the removed surface had no production callers, no CLI/MCP exposure, and no package export, so nothing external can depend on it. The admin and explorer surfaces are decided separately.
Alternatives considered
- Route Phase 3 to canonical real transforms. Rejected: it would wrap the canonical transforms in a redundant dependency scheduler to preserve a phase boundary that exists only to host synthetic tasks. The canonical path already parallelizes the real work directly.
- Rebuild a distinct scheduler on measured evidence. Rejected: no capability gap was demonstrated. A new scheduler needs affirmative benchmark evidence, which does not exist.
- Keep the scheduler as a generic utility. Rejected: a generic task-runner without a production consumer is the same second scheduler with a different justification, and its only in-tree use was fabricating batch counts.
Consequences
tests/unit/tpcdi/test_phase3_etl_enhanced.py(dedicated scheduler tests) is deleted with the module.- Integration/performance tests that asserted the synthetic
parallel_batch_processingphase keys or passedenable_parallel_processingare updated to the real interface. - The manifest-level rule stands: no placeholder or synthetic task may enter production data mutation under any outcome — this decision removes the one in-tree violator rather than legitimizing it.