eric-maynard commented on code in PR #1166:
URL: https://github.com/apache/polaris/pull/1166#discussion_r1993942744


##########
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:
   Could we just always return a new instance?



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