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


##########
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; remove their backing tags and bind each domain to 
its own tag with `PUT /domains/{domain}/backingTag` to clear the values. 
`DOMAIN` is not a taggable object type, so the tag code paths are unchanged 
(see Alternatives considered).

Review Comment:
   If two domains from a development build share `department` through different 
values, switching them to dedicated tags drops every member that carries only 
`department`. The existing assignments stay on the old tag. Please spell this 
out in the conversion steps and explain how to preserve membership by recording 
the old members and applying the dedicated tags before switching the bindings.



##########
clients/client-python/gravitino/dto/domain_dto.py:
##########
@@ -122,8 +126,8 @@ def status(self) -> Domain.Status:
     def parent(self) -> Optional[str]:
         return self._parent
 
-    def backing_tag(self) -> Optional[TagValue]:
-        return self._backing_tag.tag_value() if self._backing_tag else None
+    def backing_tag(self) -> Optional[str]:
+        return self._backing_tag.name() if self._backing_tag else None

Review Comment:
   A response with `backingTag: {"name":" "}` passes `DomainDTO.validate()` and 
exposes a blank backing tag. The previous `TagValue` conversion rejected it. 
Please reuse the backing-tag DTO validation for present bindings. The Java 
`GenericDomain.backingTag()` has the same gap after switching to the raw name 
getter.



-- 
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