[catalog] convert mz_default_privileges/mz_system_privileges to BuiltinMaterializedView#37050
Open
mtabebe wants to merge 1 commit into
Open
[catalog] convert mz_default_privileges/mz_system_privileges to BuiltinMaterializedView#37050mtabebe wants to merge 1 commit into
mtabebe wants to merge 1 commit into
Conversation
166c74e to
f220030
Compare
…inMaterializedView Problem: mz_catalog.mz_default_privileges and mz_catalog.mz_system_privileges are BuiltinTables. This requires coordinated writes from a single environmentd process, conflicting with the multi-envd goal. Solution: Convert both to BuiltinMaterializedViews backed by queries over mz_internal.mz_catalog_raw. To express the acl_mode -> char-code mapping in SQL, this commit adds a new scalar function mz_internal.parse_catalog_acl_mode(jsonb) -> text, which mirrors AclMode::from_bits + Display. The populator functions pack_default_privileges_update and pack_system_privileges_update are deleted from builtin_table_updates, and the corresponding StateUpdateKind arms in apply.rs short-circuit to Vec::new(). Testing: New behavioural SLTs for mz_default_privileges and mz_system_privileges
f220030 to
77767b0
Compare
Contributor
Author
|
The test failures are failures on main too in nightly (2 caused by me .. I'm working on a fix) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
mz_catalog.mz_default_privileges and mz_catalog.mz_system_privileges are
BuiltinTables. This requires coordinated writes from a single
environmentd process, conflicting with the multi-envd goal.
Solution:
Convert both to BuiltinMaterializedViews backed by queries over
mz_internal.mz_catalog_raw.
To express the acl_mode -> char-code mapping in SQL, this commit adds a
new scalar function mz_internal.parse_catalog_acl_mode(jsonb) -> text,
which mirrors AclMode::from_bits + Display.
The populator functions pack_default_privileges_update and
pack_system_privileges_update are deleted from builtin_table_updates,
and the corresponding StateUpdateKind arms in apply.rs short-circuit to
Vec::new().
Testing:
New behavioural SLTs for mz_default_privileges and mz_system_privileges