Skip to content

[catalog] convert mz_comments to BuiltinMaterializedView#37144

Draft
mtabebe wants to merge 1 commit into
MaterializeInc:mainfrom
mtabebe:ma/convert-builtins/mz-comments
Draft

[catalog] convert mz_comments to BuiltinMaterializedView#37144
mtabebe wants to merge 1 commit into
MaterializeInc:mainfrom
mtabebe:ma/convert-builtins/mz-comments

Conversation

@mtabebe

@mtabebe mtabebe commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Problem:
mz_internal.mz_comments is a BuiltinTable. This requires coordinated writes from a single environmentd process, conflicting with the multi-envd goal.

Solution:
Convert mz_comments to a BuiltinMaterializedView backed by a query over mz_internal.mz_catalog_raw.

Each Comment row in the durable catalog has a CommentObject key whose variant is the object type and whose inner value carries the id.

Testing:

  • test/sqllogictest/mz_comments.slt lockdown test
  • test/sqllogictest/comment.slt, oid.slt, information_schema_tables.slt, replacement-materialized-views.slt, mz_catalog_server_index_accounting.slt, catalog_server_explain.slt all pass.

Problem:
mz_internal.mz_comments is a BuiltinTable. This requires coordinated
writes from a single environmentd process, conflicting with the
multi-envd goal.

Solution:
Convert mz_comments to a BuiltinMaterializedView backed by a query over
mz_internal.mz_catalog_raw.

Each Comment row in the durable catalog has a `CommentObject` key
whose variant is the object type and whose inner value carries the id.

Testing:
- test/sqllogictest/mz_comments.slt lockdown test
- test/sqllogictest/comment.slt, oid.slt, information_schema_tables.slt,
  replacement-materialized-views.slt, mz_catalog_server_index_accounting.slt,
  catalog_server_explain.slt all pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant