Skip to content

[Cherry-pick to branch-1.3] [#12851] fix(iceberg-rest): Share the managed memory catalog in auxiliary mode (#12852) - #12923

Merged
jerryshao merged 2 commits into
branch-1.3from
cherry-pick-30687f68-to-branch-1.3
Sep 4, 2026
Merged

[Cherry-pick to branch-1.3] [#12851] fix(iceberg-rest): Share the managed memory catalog in auxiliary mode (#12852)#12923
jerryshao merged 2 commits into
branch-1.3from
cherry-pick-30687f68-to-branch-1.3

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Cherry-pick Information:

  • Original commit: 30687f6
  • Target branch: branch-1.3
  • Status: ✅ Conflicts resolved

Resolution:

  • Preserved the existing branch-1.3 authentication and credential handling.
  • Applied the catalog UUID, shared in-memory catalog, and catalog-drop cleanup changes.
  • Removed all committed conflict markers without bringing in unrelated main-only changes.

Validation:

  • ./gradlew spotlessApply
  • ./gradlew :iceberg:iceberg-common:test --tests org.apache.gravitino.iceberg.common.utils.TestIcebergCatalogUtil --tests org.apache.gravitino.iceberg.common.ops.TestIcebergCatalogWrapper
  • ./gradlew :catalogs:catalog-lakehouse-iceberg:test --tests org.apache.gravitino.catalog.lakehouse.iceberg.TestIcebergCatalogOperations --tests org.apache.gravitino.catalog.lakehouse.iceberg.TestIcebergSchema
  • ./gradlew :iceberg:iceberg-rest-server:test --tests org.apache.gravitino.iceberg.service.provider.TestDynamicIcebergConfigProvider --tests org.apache.gravitino.iceberg.service.TestIcebergCatalogWrapperManagerForREST
  • ./gradlew :core:test --tests org.apache.gravitino.catalog.TestCatalogManager
  • Conflict-marker scan and git diff --check

…iary mode (#12852)

### What changes were proposed in this pull request?

- Expose the Iceberg backend owned by `IcebergCatalogOperations`.
- Reuse that backend when the auxiliary Iceberg REST service serves a
memory catalog.
- Resolve the REST `default_catalog` alias to the configured Gravitino
catalog.
- Prevent the REST wrapper from closing the borrowed catalog.
- Add regression tests covering namespace, table, and view creation for
both explicit catalog names
  and the default catalog alias.

### Why are the changes needed?

The auxiliary Iceberg REST service currently creates a second
InMemoryCatalog. REST creates are
written to that instance, while metadata import uses the instance owned
by Gravitino CatalogManager.
Because in-memory state is local to each instance, the import cannot
find the newly created object
and leaves Iceberg and Gravitino metadata inconsistent.

Fix: #12851

### Does this PR introduce _any_ user-facing change?

Yes. Namespace, table, and view creation through the Iceberg REST API
now succeeds with a memory
backend, and the created objects are visible through the Gravitino
metadata API.

No public API or configuration property is added or removed.

### How was this patch tested?

- `./gradlew spotlessApply`
- `./gradlew :iceberg:iceberg-common:test --tests
org.apache.gravitino.iceberg.common.ops.TestIcebergCatalogWrapper`
- `./gradlew :catalogs:catalog-lakehouse-iceberg:compileJava`
- `./gradlew :iceberg:iceberg-rest-server:test --tests
org.apache.gravitino.iceberg.service.TestIcebergCatalogWrapperManagerForREST`
- `./gradlew :iceberg:iceberg-rest-server:test --tests
org.apache.gravitino.iceberg.service.TestIcebergCatalogWrapperManagerForREST
--tests
org.apache.gravitino.iceberg.service.dispatcher.TestIcebergNamespaceHookDispatcher
--tests
org.apache.gravitino.iceberg.service.dispatcher.TestIcebergTableHookDispatcher
--tests
org.apache.gravitino.iceberg.service.dispatcher.TestIcebergViewHookDispatcher`
- `./gradlew :catalogs:catalog-lakehouse-iceberg:test --tests
org.apache.gravitino.catalog.lakehouse.iceberg.integration.test.CatalogIcebergRestIT
-PskipTests -PtestMode=embedded -PjdbcBackend=h2 -PskipDockerTests=false
-PskipWeb=true`
# Conflicts:
#	catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergCatalogOperations.java
#	catalogs/catalog-lakehouse-iceberg/src/test/java/org/apache/gravitino/catalog/lakehouse/iceberg/TestIcebergCatalogOperations.java
#	core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java
#	iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/utils/IcebergCatalogUtil.java
#	iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/provider/DynamicIcebergConfigProvider.java
#	iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/provider/TestDynamicIcebergConfigProvider.java
@github-actions github-actions Bot added cherry-pick Automatically opened cherry-pick PR cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge labels Sep 4, 2026
@github-actions
github-actions Bot requested a review from jerryshao September 4, 2026 08:42
@roryqi roryqi removed the cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge label Sep 4, 2026
@roryqi roryqi changed the title [DO NOT MERGE] [Cherry-pick to branch-1.3] [#12851] fix(iceberg-rest): Share the managed memory catalog in auxiliary mode (#12852) [Cherry-pick to branch-1.3] [#12851] fix(iceberg-rest): Share the managed memory catalog in auxiliary mode (#12852) Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Author

Code Coverage Report

Overall Project 68.72% -0.3% 🟢
Files changed 58.87% 🔴

Module Coverage
aliyun 19.74% 🔴
api 47.62% 🟢
authorization-common 85.96% 🟢
aws 53.54% 🟢
azure 32.1% 🔴
catalog-common 10.4% -0.02% 🔴
catalog-fileset 80.51% 🟢
catalog-glue 69.24% 🟢
catalog-hive 79.42% 🟢
catalog-jdbc-clickhouse 84.7% 🟢
catalog-jdbc-common 45.47% 🟢
catalog-jdbc-doris 82.61% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.33% 🟢
catalog-jdbc-oceanbase 78.6% 🟢
catalog-jdbc-postgresql 83.39% 🟢
catalog-jdbc-starrocks 79.16% 🟢
catalog-kafka 77.27% 🟢
catalog-lakehouse-generic 59.35% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.9% -1.64% 🟢
catalog-lakehouse-paimon 82.17% 🟢
catalog-model 77.99% 🟢
cli 44.51% 🟢
client-java 78.31% 🟢
common 50.74% 🟢
core 82.98% -0.36% 🟢
filesystem-hadoop3 77.3% 🟢
flink 0.0% 🔴
flink-common 49.22% 🟢
flink-runtime 0.0% 🔴
gcp 32.2% 🔴
hadoop-common 15.43% 🔴
hive-metastore-common 53.77% 🟢
iceberg-aliyun-bundle 0.0% 🔴
iceberg-common 60.29% -4.29% 🟢
iceberg-rest-server 74.53% -0.83% 🟢
idp-basic 86.02% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 24.42% 🔴
lance-rest-server 60.13% 🟢
lineage 53.02% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 88.55% 🟢
server-common 76.28% 🟢
spark 28.57% 🔴
spark-common 41.66% -3.04% 🟢
trino-connector 51.18% +2.07% 🟢
Files
Module File Coverage
catalog-common IcebergConstants.java 0.0% 🔴
catalog-lakehouse-iceberg IcebergCatalogOperations.java 80.14% 🟢
core CatalogManager.java 69.38% 🟢
CatalogDropAware.java 0.0% 🔴
iceberg-common IcebergCatalogUtil.java 69.16% 🟢
IcebergCatalogWrapper.java 38.81% 🔴
iceberg-rest-server IcebergCatalogWrapperManager.java 90.48% 🟢
DynamicIcebergConfigProvider.java 41.13% 🔴
spark-common IcebergPropertiesConverter.java 86.36% 🟢
GravitinoCatalogManager.java 53.12% 🔴
GravitinoDriverPlugin.java 15.15% 🔴
GravitinoSparkConfig.java 0.0% 🔴
GravitinoIcebergCatalog.java 0.0% 🔴
IcebergPropertiesConstants.java 0.0% 🔴
trino-connector GravitinoSystemTable.java 100.0% 🟢
GravitinoConfig.java 88.34% 🟢
CatalogRegister.java 68.89% 🟢
GravitinoConnectorFactory.java 68.75% 🟢
GravitinoSystemTableFactory.java 63.64% 🟢
DropCatalogStoredProcedure.java 53.85% 🔴
CatalogConnectorManager.java 49.73% 🔴
GravitinoSystemConnector.java 30.23% 🔴
GravitinoSystemTableCatalog.java 22.5% 🔴
CreateCatalogStoredProcedure.java 12.82% 🔴
AlterCatalogStoredProcedure.java 9.26% 🔴
GravitinoSystemConnectorMetadata.java 0.0% 🔴

@jerryshao
jerryshao merged commit 9c4fd06 into branch-1.3 Sep 4, 2026
35 checks passed
@jerryshao
jerryshao deleted the cherry-pick-30687f68-to-branch-1.3 branch September 4, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick Automatically opened cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants