Repository navigation
Do not use parallel replicas for the change data feed of a Delta Lake table function - #129548
Conversation
… table function With parallel replicas, `deltaLake` and other data lake table functions with a `Cluster` variant were replaced with it even when reading the change data feed (`delta_lake_snapshot_start_version`, `delta_lake_snapshot_end_version`). The change data feed is read by `ReadFromDeltaLakeTableChangesStep`, which does not distribute work between replicas, so every replica returned all changes and each row was returned once per replica. Do not use parallel replicas for it, as `getStorageForParallelReplicasRead` already does for tables. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=129100&sha=e976b03a34770f15d52f3d8bec00636f8f51d88f&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29 Related: #129100 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [9b8ba97] Summary: ✅
AI ReviewSummaryThis PR prevents automatic parallel-replica distribution of Delta Lake change-feed reads through Missing context / blind spots
Final VerdictStatus: ✅ Approve. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 22 s compile time in total, 7 of them have a recent master baseline. |
…plicas The test bootstraps a Delta table with the change data feed enabled in MinIO, adds two versions with the `deltaLakeS3` table function, and reads the change data feed with parallel replicas over three replicas. Without the fix every change is returned three times. Address review: cover the replica exclusion with a regression test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With parallel replicas, reading the change data feed of a Delta Lake table with the
deltaLaketable function (delta_lake_snapshot_start_version/delta_lake_snapshot_end_version) returned every change once per replica.TableFunctionObjectStoragereplaces a data lake table function that has aClustervariant withStorageObjectStorageClusterwhen parallel replicas can be used. The change data feed is read byReadFromDeltaLakeTableChangesStep, which does not distribute work between replicas, so each replica read all changes.StorageObjectStorage::getStorageForParallelReplicasReadalready excludes the change data feed for tables; the table function now does the same.It was found by
05566_delta_lake_s3_deletion_vectors_change_data_feedof #129100, which reads the change data feed of a table in S3: in theParallelReplicasjob every row came three times (report).05565_delta_lake_change_data_feed_parallel_replicascovers the fix: it creates a Delta table with the change data feed enabled in MinIO and reads the change data feed with parallel replicas over three replicas. Without the fix every row comes back three times.Related: #129100
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix duplicated rows when reading the change data feed of a Delta Lake table with the
deltaLaketable function and parallel replicas.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/129548]
Version info
26.11.1.1599-master(included in26.11and later)