+1. I see Yufei's point, but also hesitant to increase surface area where not strictly necessary.
Mike On Tue, Dec 1, 2026 at 7:26 AM Alex Dutra via dev <[email protected]> wrote: > Hi all, > > +1 for the CLI approach. It's probably going to be slow but that's fine. > > Thanks, > Alex > > On Tue, Dec 1, 2026 at 6:30 AM Jean-Baptiste Onofré <[email protected]> > wrote: > > > > Hi all, > > > > Thanks Milke, no boat rocked, it's fair point :) > > > > On the security side, I'm less worried about the draft itself. It > > requires CATALOG_MANAGE_METADATA, which already allows reading the > > properties of every table, view and namespace in the catalog, so the > > report doesn't expose locations the caller can't already read. The > > work per request is also bounded by the page size. > > > > But I agree on the cost: a new Management API endpoint, a new > > authorizable operation and two new config flags, all to be maintained > > for a check that an admin may run once per catalog. > > > > On the other hand, Yufei's point is still valid: catalog admins > > usually don't have access to the Admin Tool or the metastore. > > > > So, what about a third option: do the check in the Polaris CLI, only > > with the existing APIs? > > - The CLI walks namespaces, tables and views, and compares the > > locations as documented in "Finding and fixing incompatible > > locations". "setup export" already does a similar walk. > > - It uses the catalog admin credentials, against a live server. > > - It works before and after flipping the flag, as loading a table > > without vended credentials is not affected. > > - There's no new endpoint, privilege or server config. > > > > The trade-offs: it needs one load per table/view (more requests > > overall than the endpoint), and the rules are reimplemented on the > > client, so the report is best effort. I think that's acceptable for an > > optional helper. > > > > I also agree with Yufei it's not urgent: the manual check is > > documented since 1.9.0. So I would keep PR #6263 as draft for now, and > > only comes back to the endpoint if users ask for it. An Admin Tool > > command can still be an optional follow-up. > > > > Thoughts? > > > > Regards > > JB > > > > On Tue, Dec 1, 2026 at 1:29 AM Michael Collado <[email protected]> > wrote: > > > > > > Sorry to rock the boat, but I actually agree with Dmitri on this. A > live > > > service endpoint that is rarely (maybe. never) ever used is still a > > > potential source of bugs and possible security vulnerabilities. E.g., a > > > malicious user might take advantage of the endpoint to DDOS the > service or > > > they might access information they might not otherwise be able to. An > admin > > > tool seems extremely limited in scope, has no impact on the production > > > service and can't ever be used maliciously by an attacker that doesn't > > > already have access to the database. > > > > > > Mike > > > > > > On Mon, Nov 30, 2026 at 10:47 AM Arnab Karmakar <[email protected]> > > > wrote: > > > > > > > Hi all, > > > > > > > > Thanks, Dmitri, for going with the consensus, and for the pagination > and > > > > server-load points. > > > > > > > > I've opened a draft PR for the Management API endpoint: [6263] > > > > > > > > What the draft does: > > > > > > > > - Adds GET /catalogs/{catalogName}/entity-locations/check, marked > Beta. > > > > - Supports a mode parameter: EFFECTIVE, or STRUCTURED to check before > > > > flipping the flag. > > > > - Uses the shared pagination rules from [6028], with a page-size > limit that > > > > is on by default. > > > > - Limits each page to pageSize examined entities, so one request > never > > > > scans the whole catalog. > > > > - Checks the base location and write paths stored on each Iceberg > table and > > > > view with the > > > > server's existing location validation. > > > > > > > > I'd appreciate input on four open questions. The draft's current > choice is > > > > in parentheses: > > > > > > > > 1. Which privilege should it require? (CATALOG_MANAGE_METADATA, > because the > > > > result lists every > > > > table's location in the catalog.) > > > > 2. Should the endpoint check one catalog, with the CLI looping over > > > > catalogs for a realm-wide > > > > check, or should there be a realm-wide endpoint? (One catalog per > > > > request, which keeps the work > > > > per request bounded. This differs from my earlier proposal of also > > > > checking a whole realm in > > > > one call. The CLI will fail if any catalog returns 403, so a realm > > > > report is never partial.) > > > > 3. Should pageSize limit the entities examined per page or the > findings > > > > returned? (Entities > > > > examined, so the work per request stays bounded.) > > > > 4. Should generic tables be included? (No. The server checks a > generic > > > > table's location only when > > > > it is created, so turning off unstructured locations cannot break > an > > > > existing one.) > > > > > > > > The Python CLI command will be a follow-up PR. > > > > > > > > Thanks, > > > > Arnab > > > > > > > > [6028]: https://github.com/apache/polaris/pull/6028 > > > > > > > > [6263]: https://github.com/apache/polaris/pull/6263 > > > > > > > > On Fri, Nov 20, 2026 at 12:58 AM Dmitri Bourlatchkov via dev < > > > > [email protected]> wrote: > > > > > > > > > Hi All, > > > > > > > > > > I maintain my preference for the Admin Tool command in this case. > > > > > > > > > > However, I'm fine to go with the community consensus to add a > Management > > > > > API endpoint for this. > > > > > > > > > > Please keep in mind that the number of table in a catalog can be > very > > > > > large. If the new endpoint provides a status per table, it will > have to > > > > > support pagination to avoid OOM attack vectors [1]. > > > > > > > > > > Another point is that scanning many table entities and > cross-checking > > > > their > > > > > locations (as the next logical stem in evolving this tool) can be > a heavy > > > > > operation to perform inside a live server handling ordinary > loadTable > > > > > requests from query engines. It can skew the load across Polaris > nodes. > > > > > > > > > > [1] > https://lists.apache.org/thread/2d3v9ob15w9fcpkb9qs65tmvhkmm1dcf > > > > > > > > > > Cheers, > > > > > Dmitri. > > > > > > > > > > > > > > > On Thu, Nov 19, 2026 at 1:24 PM Arnab Karmakar < > [email protected]> > > > > > wrote: > > > > > > > > > > > Hi all, > > > > > > > > > > > > Thanks, Dmitri, Yufei, JB and Vignesh, for the feedback. Here's > how I > > > > > read > > > > > > the thread and what I think we should do next. > > > > > > > > > > > > Where to run the check > > > > > > > > > > > > Yufei, JB and Vignesh prefer a live-server check, so a catalog > admin > > > > can > > > > > > check the impact with the same credentials before flipping the > flag. > > > > > Dmitri > > > > > > prefers the Admin Tool because it is standalone and easier to > retire > > > > > along > > > > > > with the flag. I think the live check fits the main use case > best, so I > > > > > > propose: > > > > > > > > > > > > 1. Add a read-only Management API operation that checks one > catalog, > > > > > or > > > > > > all catalogs in a realm. Validation runs on the server and > reuses > > > > the > > > > > > #5856 > > > > > > logic. A realm-wide check requires the caller to be able to > inspect > > > > > > every > > > > > > catalog, so the report is never partial. > > > > > > 2. Expose it through the Polaris CLI. > > > > > > 3. Treat an Admin Tool command as an optional follow-up for > when no > > > > > > server is available. > > > > > > > > > > > > Naming: I'll adopt Dmitri's check-entity-locations. It works > whether > > > > the > > > > > > flag is on or off. The exact CLI form will follow the existing > CLI > > > > > > conventions. > > > > > > > > > > > > Vignesh is right that the catalog property wins over RealmConfig. > > > > Without > > > > > > an override, the report would evaluate catalogs as unstructured > and > > > > hide > > > > > > the tables that would start failing. So I'd keep an explicit > "check as > > > > > > structured" option, for example --as-structured, for the check > you run > > > > > > before flipping the flag. By default the check uses the effective > > > > > setting, > > > > > > and the output states which mode was used. An Admin Tool command > > > > wouldn't > > > > > > need the option, since it reads RealmConfig. > > > > > > > > > > > > Output > > > > > > > > > > > > - The default output is a human-readable summary: the > effective > > > > > setting > > > > > > per catalog, one line per incompatible table or view with its > > > > location > > > > > > and > > > > > > reason, then totals. > > > > > > - --format json prints one JSON object per line, as Dmitri > > > > suggested. > > > > > > - Each finding has a stable reason code. > > > > > > - The exit code is 0 when nothing is found, 1 when > incompatible > > > > > entities > > > > > > are found, and another non-zero code for errors. > > > > > > > > > > > > Thanks, > > > > > > Arnab > > > > > > > > > > > > On Wed, Nov 18, 2026 at 3:07 PM vignesh a < > [email protected]> > > > > > wrote: > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > +1 from me, I agree with Yufei and JB that the check > > > > > > > should run against a live server. > > > > > > > > > > > > > > The original case is turning off > > > > > > > polaris.config.allow.unstructured.table.location on a > > > > > > > catalog. That update doesn't look at table > > > > > > > locations at all. The check from #5856 only runs later, on > load, > > > > > > > commit, rename or credential vending. > > > > > > > > > > > > > > If a report reuses that helper against live catalogs, > > > > > > > the catalog property wins over RealmConfig [1]. > > > > > > > Until the property is flipped, those catalogs still > > > > > > > evaluate as unstructured. The tables that would start > > > > > > > returning 403 stay hidden. > > > > > > > > > > > > > > I'd add a "check as structured" option so a > > > > > > > catalog admin can run it before flipping. > > > > > > > > > > > > > > Thanks, > > > > > > > Vignesh > > > > > > > > > > > > > > [1] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://github.com/apache/polaris/blob/ecae57895640839ae692649e1434d3570d4203cc/polaris-core/src/main/java/org/apache/polaris/core/config/PolarisConfiguration.java#L142-L166 > > > > > > > > > > > > > > > > > > > > > > >
