mchades commented on code in PR #15025:
URL: https://github.com/apache/gravitino/pull/15025#discussion_r4613985520


##########
design-docs/domain-design.md:
##########
@@ -58,23 +58,23 @@ DomainRel { parentId, childId, audit_info }      // one 
edge per subdomain
 - Domains live under a metalake. A subdomain and its parent are in the same 
metalake.
 - Domain names are unique within a metalake across both levels: top-level 
domains and subdomains share one namespace, so a domain is addressed by its 
name alone. Domain names follow the same constraints as tag names (up to 128 
characters) and may contain `/` (see REST API, Encoding).
 - A unique index on `DomainRel (child_id, deleted_at)` keeps one parent per 
domain. `parent` is not stored on `Domain`; the API derives it. Dropping the 
index and checks would allow multiple parents later without a data migration.
-- The backing tag is stored on the domain row as the tag's ID and an optional 
value, with an index on `(metalake_id, backing_tag_id, backing_tag_value, 
deleted_at)` for the reverse lookup "which domain does this (tag, value) back". 
`DOMAIN` is not a taggable object type, so the tag code paths are unchanged 
(see Alternatives considered).
+- The backing tag is stored on the domain row as the tag's ID, with an index 
on `(metalake_id, backing_tag_id, backing_tag_value, deleted_at)` for the 
reverse lookup "which domain does this tag back". The `backing_tag_value` 
column is kept in storage for a possible future extension, but the API never 
sets it. Domains created by 2.0.0 development builds with a value keep 
filtering membership by it; to clear the values, bind each domain to its own 
tag with `PUT /domains/{domain}/backingTag`. When several domains share one tag 
through different values (for example `department=finance` and 
`department=risk`), the existing assignments stay on the old tag, so switching 
to dedicated tags drops every member that carries only the old tag. Copying 
container assignments can widen membership: with `department=finance` on a 
schema and `department=risk` on a table beneath it, tagging the schema with 
Finance's new tag also makes the table a Finance member. To preserve the 
existing leaf memberships
 : (1) record each domain's own leaf members with `GET 
/domains/{domain}/objects?expand=true`, keeping those whose relations include 
Direct or Inherited; (2) create the dedicated tags and assign each directly to 
the recorded leaves of its domain; (3) switch the bindings to the dedicated 
tags; (4) optionally remove the old tag's assignments by name. The member list 
is filtered by object visibility, so the operator needs read and tag-assignment 
access to every affected object; an object missing from the inventory loses its 
membership when the binding changes. `DOMAIN` is not a taggable object type, so 
the tag code paths are unchanged (see Alternatives considered).

Review Comment:
   Please document the effects of the leaf-only conversion. A tagged schema or 
catalog drops out of the default member listing, and its inventoried leaves 
become direct members. Tables outside the inventory, including external tables 
first recorded after the switch, stop inheriting the domain from that 
container. The steps preserve the recorded leaf set at conversion time.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to