Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
330579a
ch: Distributed Table Engine
serprex Jun 2, 2025
cb08a6d
ui
serprex Jun 3, 2025
15f1535
fix adding column on source with distributed table as destination, ne…
serprex Jun 5, 2025
68da86d
move cluster from table mapping to peer
serprex Jun 5, 2025
065f721
more ON CLUSTER
serprex Jun 5, 2025
b695f20
move replicated to peer, apply to raw table
serprex Jun 6, 2025
8fc83bd
onCluster method
serprex Jun 6, 2025
c3f37d2
redundant
serprex Jun 6, 2025
0a8e99a
fixes
serprex Jun 6, 2025
f881184
experiment with ch cluster in ci
serprex Jun 6, 2025
3c6248e
var
serprex Jun 7, 2025
18fceb4
run 2nd copy of ci vs cluster
serprex Jun 7, 2025
3497ac3
ON CLUSTER
serprex Jun 7, 2025
eb067ee
zookeeper
serprex Jun 7, 2025
a0438c2
checking for keeper error message
serprex Jun 7, 2025
fe21569
/
serprex Jun 7, 2025
a7c84bd
distributed raw table. e2e: shard by id by default
serprex Jun 7, 2025
afe7b3e
turn off replicated, see if it has impact, best add it when replicas …
serprex Jun 8, 2025
9f14a02
cluster field optional
serprex Jun 9, 2025
2495f58
do not create distributed table in front of null tables
serprex Jun 9, 2025
741b498
RENAME ON CLUSTER
serprex Jun 16, 2025
08bc1f3
I think this is failing over ORDER BY
serprex Jun 17, 2025
bfed75b
avoid terminating other jobs
serprex Jun 17, 2025
368818c
skip removing tables from raw table
serprex Jun 23, 2025
af1bb3b
differentiate generic prefix
serprex Jun 24, 2025
55f4049
don't trust sharding by uuid
serprex Jun 24, 2025
decf9e4
drill down
serprex Jun 24, 2025
b570874
version
serprex Jun 24, 2025
45ec359
parallel_distributed_insert_select 2
serprex Jun 24, 2025
f08d258
insert_distributed_sync=1
serprex Jun 25, 2025
3c639b1
new test specimen
serprex Jun 25, 2025
779db19
ON CLUSTER for RENAME TABLE
serprex Jun 25, 2025
3f97e50
reenable tests
serprex Jun 25, 2025
5c56084
little fixes
serprex Jun 25, 2025
d4732a2
try this again
serprex Jun 25, 2025
451f388
tweak prefix
serprex Jun 25, 2025
11cbbef
more time for initial snapshot
serprex Jun 26, 2025
72b822b
i give up
serprex Jun 26, 2025
8ba6c9b
revert patience
serprex Jun 26, 2025
929e6aa
back to cityHash64
serprex Jun 26, 2025
c3b76ff
skip failing tests
serprex Jun 26, 2025
c8b5fd7
skip more updates
serprex Jun 26, 2025
1c5dfe1
test with parallel_distributed_insert_select=0
serprex Jun 26, 2025
0dd2776
fix mongo
serprex Jun 27, 2025
febc254
don't apply schema changes to null tables on clusters
serprex Jun 26, 2025
3dad0c6
remove s3 concurrency above 256MiB part size
serprex Jul 1, 2025
87bbb1c
feedback
serprex Jul 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 131 additions & 1 deletion .github/workflows/flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,137 @@ jobs:

- name: Run ClickHouse
run: |
./clickhouse server &
cat > config1.xml <<EOF
<clickhouse>
<profiles><default></default></profiles>
<users>
<default>
<password></password>
<networks>
<ip>::/0</ip>
</networks>
<profile>default</profile>
<quota>default</quota>
<access_management>1</access_management>
<named_collection_control>1</named_collection_control>
</default>
</users>
<logger><level>none</level></logger>
<path>var/lib/clickhouse</path>
<tmp_path>var/lib/clickhouse/tmp</tmp_path>
<user_files_path>var/lib/clickhouse/user_files</user_files_path>
<format_schema_path>var/lib/clickhouse/format_schemas</format_schema_path>
<tcp_port>9000</tcp_port>
<http_port remove="1"/>
<postgresql_port remove="1"/>
<mysql_port remove="1"/>
<macros>
<shard>1</shard>
<replica>1</replica>
</macros>
<zookeeper>
<node>
<host>localhost</host>
<port>2181</port>
</node>
</zookeeper>
<distributed_ddl>
<path>/clickhouse/task_queue/ddl</path>
</distributed_ddl>
<remote_servers>
<cicluster>
<shard>
<replica>
<host>localhost</host>
<port>9000</port>
</replica>
</shard>
<shard>
<replica>
<host>localhost</host>
<port>9001</port>
</replica>
</shard>
</cicluster>
</remote_servers>
</clickhouse>
EOF
cat > config2.xml <<EOF
<clickhouse>
<profiles><default></default></profiles>
<users>
<default>
<password></password>
<networks>
<ip>::/0</ip>
</networks>
<profile>default</profile>
<quota>default</quota>
<access_management>1</access_management>
<named_collection_control>1</named_collection_control>
</default>
</users>
<logger><level>none</level></logger>
<path>var/lib/clickhouse</path>
<tmp_path>var/lib/clickhouse/tmp</tmp_path>
<user_files_path>var/lib/clickhouse/user_files</user_files_path>
<format_schema_path>var/lib/clickhouse/format_schemas</format_schema_path>
<tcp_port>9001</tcp_port>
<http_port remove="1"/>
<postgresql_port remove="1"/>
<mysql_port remove="1"/>
<macros>
<shard>2</shard>
<replica>1</replica>
</macros>
<zookeeper>
<node>
<host>localhost</host>
<port>2181</port>
</node>
</zookeeper>
<distributed_ddl>
<path>/clickhouse/task_queue/ddl</path>
</distributed_ddl>
<remote_servers>
<cicluster>
<shard>
<replica>
<host>localhost</host>
<port>9000</port>
</replica>
</shard>
<shard>
<replica>
<host>localhost</host>
<port>9001</port>
</replica>
</shard>
</cicluster>
</remote_servers>
</clickhouse>
EOF
cat > config-keeper.xml <<EOF
<clickhouse>
<keeper_server>
<tcp_port>2181</tcp_port>
<server_id>1</server_id>
<log_storage_path>var/lib/clickhouse/coordination/log</log_storage_path>
<snapshot_storage_path>var/lib/clickhouse/coordination/snapshots</snapshot_storage_path>
<raft_configuration>
<server>
<id>1</id>
<hostname>localhost</hostname>
<port>9234</port>
</server>
</raft_configuration>
</keeper_server>
</clickhouse>
EOF
mkdir ch1 ch2 chkeep
(cd ch1 && ../clickhouse server -C ../config1.xml) &
(cd ch2 && ../clickhouse server -C ../config2.xml) &
(cd chkeep && ../clickhouse keeper -C ../config-keeper.xml) &
Comment thread
serprex marked this conversation as resolved.
Outdated

- name: Install Temporal CLI
uses: temporalio/setup-temporal@1059a504f87e7fa2f385e3fa40d1aa7e62f1c6ca # v0
Expand Down
2 changes: 1 addition & 1 deletion flow/activities/flowable_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func syncCore[TPull connectors.CDCPullConnectorCore, TSync connectors.CDCSyncCon
defer connectors.CloseConnector(ctx, dstConn)

syncState.Store(shared.Ptr("updating schema"))
if err := dstConn.ReplayTableSchemaDeltas(ctx, config.Env, flowName, recordBatchSync.SchemaDeltas); err != nil {
if err := dstConn.ReplayTableSchemaDeltas(ctx, config.Env, flowName, options.TableMappings, recordBatchSync.SchemaDeltas); err != nil {
return nil, fmt.Errorf("failed to sync schema: %w", err)
}

Expand Down
1 change: 1 addition & 0 deletions flow/connectors/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func (c *BigQueryConnector) ReplayTableSchemaDeltas(
ctx context.Context,
env map[string]string,
flowJobName string,
_ []*protos.TableMapping,
schemaDeltas []*protos.TableSchemaDelta,
) error {
for _, schemaDelta := range schemaDeltas {
Expand Down
2 changes: 1 addition & 1 deletion flow/connectors/bigquery/qrep.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (c *BigQueryConnector) replayTableSchemaDeltasQRep(
}

if err := c.ReplayTableSchemaDeltas(
ctx, config.Env, config.FlowJobName, []*protos.TableSchemaDelta{tableSchemaDelta},
ctx, config.Env, config.FlowJobName, nil, []*protos.TableSchemaDelta{tableSchemaDelta},
); err != nil {
return nil, fmt.Errorf("failed to add columns to destination table: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion flow/connectors/bigquery/qrep_avro_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (s *QRepAvroSyncMethod) SyncRecords(
slog.String(string(shared.FlowNameKey), req.FlowJobName),
slog.String("dstTableName", rawTableName))

if err := s.connector.ReplayTableSchemaDeltas(ctx, req.Env, req.FlowJobName, req.Records.SchemaDeltas); err != nil {
if err := s.connector.ReplayTableSchemaDeltas(ctx, req.Env, req.FlowJobName, req.TableMappings, req.Records.SchemaDeltas); err != nil {
return nil, fmt.Errorf("failed to sync schema changes: %w", err)
}

Expand Down
Loading
Loading