You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/08 10:54:48 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #11960: [PIP-63] Readonly-Topic-Ownership-Support

eolivelli commented on a change in pull request #11960:
URL: https://github.com/apache/pulsar/pull/11960#discussion_r704305787



##########
File path: pulsar-client-api/src/main/java/org/apache/pulsar/client/api/CursorClient.java
##########
@@ -0,0 +1,97 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.client.api;
+
+import java.io.Closeable;
+import java.util.concurrent.CompletableFuture;
+import org.apache.pulsar.common.classification.InterfaceAudience;
+import org.apache.pulsar.common.classification.InterfaceStability;
+
+/**
+ * A {@link CursorClient} connects to a PersistentTopic and can manage cursor data of a persistent subscription.
+ * This is an interface that abstracts behavior of Pulsar's cursor client.
+ * This {@link CursorClient} is used by a readonly topic owner.
+ *
+ * @since 2.9.0
+ */
+@InterfaceAudience.Private
+@InterfaceStability.Evolving
+public interface CursorClient extends Closeable {

Review comment:
       this is a new API and it is not cited in PIP-63 
   https://github.com/apache/pulsar/wiki/PIP-63%3A-Readonly-Topic-Ownership-Support 
   
   can you please update the document or start a new one ?

##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/Policies.java
##########
@@ -125,6 +125,12 @@
     @SuppressWarnings("checkstyle:MemberName")
     public String resource_group_name = null;
 
+    /**
+     * if writer_namespace is set, it means this is a readonly namespace. All data is read from writer_namespace
+     */
+    public String writerNamespace = null;

Review comment:
       I believe that this is a little bit confusing an error prone.
   can we add a "readonlyModeEnabled" flag ? (or with a better name)
   




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org