gaborkaszab commented on code in PR #14398:
URL: https://github.com/apache/iceberg/pull/14398#discussion_r2610875391
##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -1146,6 +1305,16 @@ protected RESTTableOperations newTableOps(
supportedEndpoints);
}
+ /**
+ * Create a new {@link RESTTableOperations} based on an existing one.
+ *
+ * @param originalOps the ops to clone
+ * @return a new RESTTableOperations instance
+ */
+ protected RESTTableOperations newTableOps(RESTTableOperations originalOps) {
Review Comment:
@XJDKC @flyrain After I rebased my changes I observed that this
freshness-aware loading functionality messes up your injectable table ops
change. The reason in a nutshell is when I return a table from client-side
cache, I have to clone it (in order to the clients not having a race condition
on using the same table object), but when cloning the table the injected ops is
lost.
As a solution, I introduced another variant of the `newTableOps` that is
basically to clone on ops object into another one. With this design you'll have
to override this new function too, whenever this PR is merged. I haven't found
any other good way to solve this.
Would you mind taking a look?
--
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]