Skip to content

Commit 4220ea3

Browse files
committed
comment
1 parent eb9c534 commit 4220ea3

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

posthog/clickhouse/migrations/0183_shard_document_embeddings.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,8 @@
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-
2515
operations = [
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],
@@ -33,7 +23,7 @@
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],

0 commit comments

Comments
 (0)