mengw15 commented on code in PR #7539:
URL: https://github.com/apache/texera/pull/7539#discussion_r3762552992


##########
common/workflow-core/src/main/scala/org/apache/texera/amber/core/storage/result/iceberg/IcebergDocument.scala:
##########
@@ -72,7 +72,10 @@ private[storage] class IcebergDocument[T >: Null <: AnyRef](
 
   private val lock = new ReentrantReadWriteLock()
 
-  @transient lazy val catalog: Catalog = 
IcebergCatalogInstance.getInstance(warehouse)
+  // Resolved per use, never held: the catalog cache is bounded and closes 
evicted
+  // entries (#7290), so a pinned reference could outlive its catalog. A 
public def
+  // (not a lazy val) also means a replaced/rebuilt catalog is picked up 
immediately.
+  def catalog: Catalog = IcebergCatalogInstance.getInstance(warehouse)

Review Comment:
   Done in 92e9fe2f6. `seekToUsableFile` now re-resolves the table from the 
current catalog at every seek instead of refreshing a pinned one — snapshot 
continuity already lived in `lastSnapshotId`, not in the `Table` instance — so 
an actively polling reader bumps its cache entry's access time on every seek 
and can no longer look idle. Pinned by a workflow-core case that counts catalog 
resolutions through a delegating catalog (the pinned-refresh implementation 
resolved exactly once, at construction); the integration lazy-advancement spec 
now counts `loadTable` calls, which is where metadata loads surface after this 
change.



-- 
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]

Reply via email to