jasonf20 opened a new issue, #13515: URL: https://github.com/apache/iceberg/issues/13515
### Apache Iceberg version 1.9.1 (latest release) ### Query engine None ### Please describe the bug 🐞 I am running into issues with long running table operations against Snowflake Open Catalog (REST Catalog). After enough time I get `The provided token has expired`. Creating an entirely new instance of the Rest Catalog solves the issue, but my understanding is that the sessions should be refreshing the credentials automatically. Tested with the latest version: 1.9.1 Here is some example code that reproduced the issue: ```scala import scala.collection.JavaConverters._ import org.apache.hadoop.conf.Configuration import org.apache.iceberg.CatalogProperties import org.apache.iceberg.catalog._ import org.apache.iceberg.rest.RESTCatalog object RunForAnHour { def main(args: Array[String]): Unit = { val uri = "https://<url-details>/polaris/api/catalog" val catalogProperties = Map( CatalogProperties.URI -> uri, CatalogProperties.WAREHOUSE_LOCATION -> "<catalog_name>", "scope" -> "PRINCIPAL_ROLE:ALL", "credential" -> "<credentials>", "header.X-Iceberg-Access-Delegation" -> "vended-credentials" ) val catalog = new RESTCatalog() catalog.setConf(new Configuration()) catalog.initialize("iceberg", catalogProperties.asJava) val table = catalog.loadTable(TableIdentifier.of("<sceham>", "<table>")) var i = 0 while (i < 65) { try { table.refresh() val files = table.newScan().planFiles().asScala.size println(i + " " + files) } catch { case e: Throwable => e.printStackTrace() } Thread.sleep(60000) i += 1 } println("Done") System.exit(0) } } ``` Run the above for long enough and eventually you will receive an error due to credentials being expired. ### Willingness to contribute - [ ] I can contribute a fix for this bug independently - [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community - [x] I cannot contribute a fix for this bug at this time -- 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: issues-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org