File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
posthog/clickhouse/migrations Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 1212 KAFKA_DOCUMENT_EMBEDDINGS_TABLE_SQL ,
1313)
1414
15- # This migration creates the new sharded table structure alongside the existing
16- # replicated table. The old replicated table (posthog_document_embeddings) is
17- # left intact so data can be copied from it to the new sharded table.
18- #
19- # New tables created:
20- # - sharded_posthog_document_embeddings: The sharded data table
21- # - distributed_posthog_document_embeddings: Distributed read table for the sharded data
22- #
23- # The MV and writable table are recreated to write to the new sharded table.
24-
2515operations = [
26- # 1. Drop MV to stop writes
16+ # 1. Drop MV
2717 run_sql_with_exceptions (
2818 f"DROP TABLE IF EXISTS { DOCUMENT_EMBEDDINGS_MV } " ,
2919 node_roles = [NodeRole .INGESTION_SMALL ],
3323 f"DROP TABLE IF EXISTS { KAFKA_DOCUMENT_EMBEDDINGS } " ,
3424 node_roles = [NodeRole .INGESTION_SMALL ],
3525 ),
36- # 3. Drop old writable distributed table
26+ # 3. Drop old writable table
3727 run_sql_with_exceptions (
3828 f"DROP TABLE IF EXISTS { DOCUMENT_EMBEDDING_WRITABLE } " ,
3929 node_roles = [NodeRole .INGESTION_SMALL ],
You can’t perform that action at this time.
0 commit comments