adutra commented on code in PR #1166:
URL: https://github.com/apache/polaris/pull/1166#discussion_r1995199227
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/BasePersistence.java:
##########
@@ -392,4 +392,15 @@ boolean hasChildren(
@Nullable PolarisEntityType optionalEntityType,
long catalogId,
long parentId);
+
+ /**
+ * Creates a fresh copy of this persistence implementation that is able to
function independently
+ * of {@code this object}. The {@code copyOf} method is intended to be used
to isolate state of
+ * {@link BasePersistence} instances in different thread.
+ *
+ * <p>If a particular implementation is thread-safe, it may return {@code
this} from this method.
+ */
+ default BasePersistence copyOf() {
+ return this;
Review Comment:
If the base idea behind this PR is to actually provide a deep clone of
`PolarisCallContext`, I'd vote to rename all `copyOf` methods to something like
`deepClone` or `deepCopy`. But since that's largely a matter of taste, I'm fine
with `copyOf` as well.
--
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]