jerryshao commented on code in PR #15025:
URL: https://github.com/apache/gravitino/pull/15025#discussion_r4613696559
##########
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:
Fixed in 3a6b5ee053: the conversion note now explains that assignments stay
on the shared tag and lists the steps to keep membership: record members,
assign the dedicated tags to them, switch the bindings, then optionally remove
the old tag.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
##########
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:
Fixed in 3a6b5ee053: Python `DomainDTO.validate()` now validates a present
backing tag, and Java `GenericDomain.backingTag()` validates the DTO before
returning the name; both have tests for a blank name.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
--
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]