You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "diqiu50 (via GitHub)" <gi...@apache.org> on 2026/06/10 09:22:34 UTC

[PR] [#11534] Fix GravitinoGlueCatalog not invalidating Iceberg SparkCatalog cache after table mutations [gravitino]

diqiu50 opened a new pull request, #11559:
URL: https://github.com/apache/gravitino/pull/11559

   ## What changes were proposed in this pull request?
   
   `GravitinoGlueCatalog` routes Iceberg tables through a separate `icebergGlueCatalog` (`SparkCatalog`) whose internal `CachingCatalog` was never invalidated after `alterTable/dropTable/purgeTable/renameTable`. This caused stale schema reads and `IllegalStateException: Couldn't find <col> in [...]` after `ALTER TABLE ADD COLUMNS`.
   
   Fix: change `BaseCatalog` to call `invalidateTable(ident)` via virtual dispatch (instead of `sparkCatalog.invalidateTable` directly), then override `invalidateTable` in `GravitinoGlueCatalog` to also clear `icebergGlueCatalog`'s cache.
   
   ## How was this patch tested?
   
   - Unit tests verifying both catalog backends are invalidated
   - Integration test `testIcebergAlterTableAddColumnCacheInvalidation` verified end-to-end against real AWS Glue + S3 (Spark 3.5)
   
   Fixes #11534


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#11534] fix(spark-connector): GravitinoGlueCatalog does not invalidate Iceberg SparkCatalog cache after table mutations [gravitino]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11559:
URL: https://github.com/apache/gravitino/pull/11559#issuecomment-4670017065

   <!-- coverage-report -->
   ### Code Coverage Report
   |Overall Project|66.93% **`-0.31%`**|:green_circle:|
   |:-|:-|:-:|
   |Files changed|48.17%|:red_circle:|
   <br>
   
   |Module|Coverage||
   |:-|:-|:-:|
   |aliyun|1.72%|:red_circle:|
   |api|46.82%|:green_circle:|
   |authorization-common|85.96%|:green_circle:|
   |aws|3.66%|:red_circle:|
   |azure|2.47%|:red_circle:|
   |catalog-common|10.4%|:red_circle:|
   |catalog-fileset|80.23%|:green_circle:|
   |catalog-glue|66.72% **`-19.27%`**|:green_circle:|
   |catalog-hive|79.44%|:green_circle:|
   |catalog-jdbc-clickhouse|80.02%|:green_circle:|
   |catalog-jdbc-common|44.22%|:green_circle:|
   |catalog-jdbc-doris|80.28%|:green_circle:|
   |catalog-jdbc-hologres|54.03%|:green_circle:|
   |catalog-jdbc-mysql|79.23% **`-2.76%`**|:green_circle:|
   |catalog-jdbc-oceanbase|78.38%|:green_circle:|
   |catalog-jdbc-postgresql|82.29%|:green_circle:|
   |catalog-jdbc-starrocks|78.51%|:green_circle:|
   |catalog-kafka|77.01%|:green_circle:|
   |catalog-lakehouse-generic|58.53%|:green_circle:|
   |catalog-lakehouse-hudi|79.1%|:green_circle:|
   |catalog-lakehouse-iceberg|85.79%|:green_circle:|
   |catalog-lakehouse-paimon|79.15%|:green_circle:|
   |catalog-model|77.72%|:green_circle:|
   |cli|44.51%|:green_circle:|
   |client-java|77.91% **`+0.16%`**|:green_circle:|
   |common|49.9%|:green_circle:|
   |core|82.38%|:green_circle:|
   |filesystem-hadoop3|77.27%|:green_circle:|
   |flink|0.0%|:red_circle:|
   |flink-common|45.72%|:green_circle:|
   |flink-runtime|0.0%|:red_circle:|
   |gcp|14.12%|:red_circle:|
   |hadoop-common|10.39%|:red_circle:|
   |hive-metastore-common|53.9%|:green_circle:|
   |iceberg-common|57.41%|:green_circle:|
   |iceberg-rest-server|73.61%|:green_circle:|
   |idp-basic|86.18%|:green_circle:|
   |integration-test-common|0.0%|:red_circle:|
   |jobs|66.17%|:green_circle:|
   |lance-common|20.81%|:red_circle:|
   |lance-rest-server|60.54%|:green_circle:|
   |lineage|53.02%|:green_circle:|
   |optimizer|82.95%|:green_circle:|
   |optimizer-api|21.95%|:red_circle:|
   |server|85.87%|:green_circle:|
   |server-common|73.28%|:green_circle:|
   |spark|28.57%|:red_circle:|
   |spark-common|41.4% **`-6.7%`**|:green_circle:|
   |trino-connector|40.13%|:green_circle:|
   
   <details>
   <summary>Files</summary>
   
   |Module|File|Coverage||
   |:-|:-|:-|:-:|
   |catalog-glue|[GlueCatalogOperations.java](https://github.com/diqiu50/gravitino/blob/7979c55cdd8aa44cde611233f01ed73da31225f0/catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueCatalogOperations.java)|72.16%|:green_circle:|
   ||[GlueIcebergTableHelper.java](https://github.com/diqiu50/gravitino/blob/7979c55cdd8aa44cde611233f01ed73da31225f0/catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueIcebergTableHelper.java)|38.66%|:red_circle:|
   |catalog-jdbc-mysql|[MysqlColumnDefaultValueConverter.java](https://github.com/diqiu50/gravitino/blob/7979c55cdd8aa44cde611233f01ed73da31225f0/catalogs/catalog-jdbc-mysql/src/main/java/org/apache/gravitino/catalog/mysql/converter/MysqlColumnDefaultValueConverter.java)|37.14%|:red_circle:|
   |client-java|[HTTPClient.java](https://github.com/diqiu50/gravitino/blob/7979c55cdd8aa44cde611233f01ed73da31225f0/clients/client-java/src/main/java/org/apache/gravitino/client/HTTPClient.java)|81.21%|:green_circle:|
   |spark-common|[GravitinoGlueCatalog.java](https://github.com/diqiu50/gravitino/blob/7979c55cdd8aa44cde611233f01ed73da31225f0/spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/glue/GravitinoGlueCatalog.java)|42.11%|:red_circle:|
   ||[BaseCatalog.java](https://github.com/diqiu50/gravitino/blob/7979c55cdd8aa44cde611233f01ed73da31225f0/spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/catalog/BaseCatalog.java)|1.95%|:red_circle:|
   
   </details>


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#11534] fix(spark-connector): GravitinoGlueCatalog does not invalidate Iceberg SparkCatalog cache after table mutations [gravitino]

Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 merged PR #11559:
URL: https://github.com/apache/gravitino/pull/11559


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org