piotrrzysko opened a new issue, #17585: URL: https://github.com/apache/iceberg/issues/17585
### Apache Iceberg version 1.11.0 (latest release) ### Query engine Trino ### Please describe the bug 🐞 `RESTSessionCatalog`'s `RESTTableCache` caches `TableMetadata` and shares it across threads. `TableMetadata` itself handles this correctly - its lazy fields use `synchronized` + `volatile`. However, `BaseSnapshot` and `Schema`, reachable from `TableMetadata`, have lazily-initialized fields with no synchronization: https://github.com/apache/iceberg/blob/7aa4f97fae8f6393950d925ca67e8331a780a20a/core/src/main/java/org/apache/iceberg/BaseSnapshot.java#L51-L57 https://github.com/apache/iceberg/blob/7aa4f97fae8f6393950d925ca67e8331a780a20a/api/src/main/java/org/apache/iceberg/Schema.java#L77-L83 `PartitionSpec` follows the same lazy pattern but correctly uses `synchronized` + `volatile`. ### 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 - [ ] 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: [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]
