jarredhj0214 opened a new issue, #14756:
URL: https://github.com/apache/gravitino/issues/14756
### What would you like to be improved?
We would like community guidance on a naming conflict between a Paimon
catalog exposed by Gravitino Catalog Store and a native Paimon catalog
explicitly created by an existing Flink job.
The platform exposes `paimon_catalog` through Gravitino. Existing jobs also
declare a native Paimon catalog with the same name:
```sql
CREATE CATALOG paimon_catalog WITH (
'type' = 'paimon',
'metastore' = 'hive',
'hive-conf-dir' = '/opt/hadoop/conf'
);
INSERT INTO paimon_catalog.db_name.table_name ...;
```
After enabling Gravitino Catalog Store, the creation statement fails:
```text
Could not execute CREATE CATALOG:
(catalogName: [paimon_catalog], ..., ignoreIfExists: [false])
CatalogException: Catalog paimon_catalog already exists.
```
In our customized connector, `GravitinoSessionCatalogStore` stores native
catalogs in session memory. `getCatalog()` checks session memory before falling
back to Gravitino, but `contains()` checks both stores:
```java
return memoryCatalogStore.contains(catalogName)
|| gravitinoCatalogStore.contains(catalogName);
```
The existing platform catalog therefore prevents explicit creation of the
session-local Paimon catalog. We need to verify whether the duplicate-name
check occurs in Flink's `CatalogManager` before the store's creation path is
reached; changing storage or lookup precedence alone may not resolve it.
Removing `CREATE CATALOG` uses the platform configuration rather than the
user's explicit configuration. `IF NOT EXISTS` also does not ensure the user
configuration is used. Identical catalog names do not necessarily mean
identical configuration or underlying data sources.
**Environment:** company-customized Flink `1.18-SNAPSHOT` and Gravitino
connector. We still need to compare the customized creation flow with upstream.
This is not yet a confirmed upstream reproduction. Only the Paimon scenario has
been observed; other catalog types have not been verified.
### How should we improve?
One possible approach is to allow an explicitly created native Paimon
catalog to shadow the platform's Gravitino catalog within the current session:
- An explicitly created session-local Paimon catalog takes precedence;
otherwise, lookup falls back to Gravitino.
- Shadowing does not modify or delete server-side Gravitino metadata.
- Repeated creation of the same session-local catalog retains Flink's normal
duplicate-name semantics.
- Only explicit native session-local creation is under discussion; this is
not a proposal to overwrite arbitrary catalogs.
We would appreciate guidance on:
1. Are there existing discussions or recommended compatibility approaches
for this Paimon scenario?
2. Does session-local shadowing align with Gravitino's intended design?
3. Can it be implemented in the Gravitino Catalog Store layer, or must
Flink's `CatalogManager` creation flow also change?
4. How should authorization and `DROP CATALOG` behave while a native Paimon
catalog shadows a Gravitino catalog?
For example, a possible drop behavior would remove only the local catalog
and reveal the platform catalog again, without deleting the remote catalog.
This needs community agreement rather than being assumed as existing behavior.
A native Paimon catalog would continue to use its own connector
authentication and authorization; it must not be described as automatically
inheriting Gravitino authorization. Whether the platform permits this access
path is a separate policy decision, and the boundary should be explicit.
--
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]