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