smallx opened a new pull request #3837:
URL: https://github.com/apache/iceberg/pull/3837
When `CachingCatalog` is enabled, rebuilding table in another catalog or
program may cause `Table UUID does not match` problems. This can be reproduced
by the following code:
```java
sql("CREATE TABLE %s (id bigint NOT NULL, data string) USING iceberg",
tableName);
// load table to CachingCatalog
sql("SELECT count(1) FROM %s", tableName);
// recreate table from another catalog or program
Schema schema = catalog.loadTable(tableIdent).schema();
catalog.dropTable(tableIdent);
catalog.createTable(tableIdent, schema);
// refresh table
sql("REFRESH TABLE %s", tableName);
```
The cache timeout policy introduced by
https://github.com/apache/iceberg/pull/3543 can alleviate this problem by
waiting for a period of time (30s by default). But it would be better to allow
to invalidate the cache immediately and reload the table.
This PR allows the `REFRESH TABLE ...` command to forcibly refresh the cache
if the table is rebuilt from another place.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]