roryqi opened a new issue, #12851:
URL: https://github.com/apache/gravitino/issues/12851
### Version\n\nmain branch\n\n### Describe what's wrong\n\nWhen the embedded
Iceberg REST service runs in auxiliary mode with an Iceberg catalog using ,
creating a namespace, table, or view through the Iceberg REST API writes the
object to the Iceberg catalog but fails to import it into the Gravitino
metadata store.\n\nThe REST service and Gravitino CatalogManager create
separate InMemoryCatalog instances. The create path writes through the
REST-owned instance, while the metadata import reads through the
CatalogManager-owned instance and cannot find the newly created object.\n\nThis
leaves the Iceberg data path and Gravitino metadata inconsistent. Objects
created through Iceberg REST cannot participate in Gravitino governance,
including ownership, tags, policies, and lineage.\n\n### Error message and/or
stacktrace\n\nA namespace create returns 500:\n\n NoSuchSchemaException:\n
Iceberg schema (database) does not exist: probe_ns in Gravitino store\n\nThe
underlying cause is:\n
\n org.apache.iceberg.exceptions.NoSuchNamespaceException:\n Namespace
does not exist: probe_ns\n at
org.apache.iceberg.inmemory.InMemoryCatalog.loadNamespaceMetadata(...)\n\nThe
object is nevertheless visible through the Iceberg REST API, and retrying the
create returns 409 AlreadyExistsException.\n\n### How to reproduce\n\n1. Run
Gravitino with the embedded Iceberg REST service enabled.\n2. Create an Iceberg
catalog using .\n3. Create a namespace through Iceberg REST:\n\n POST
/iceberg/v1/{catalog}/namespaces\n
{"namespace":["probe_ns"],"properties":{}}\n\n4. Observe that the request
returns 500.\n5. List namespaces through Iceberg REST and observe .\n6. List
schemas through the Gravitino metadata API and observe that is
absent.\n\nTables and views created through their corresponding Iceberg REST
endpoints show the same behavior.\n\n### Additional context\n\nThe auxiliary
Iceberg REST wrapper should reuse the in-memory Iceberg catalog owned by
Gravitino Cat
alogManager. The REST wrapper must not close that borrowed catalog because its
lifecycle remains owned by CatalogManager.
--
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]