comnetwork commented on a change in pull request #4182:
URL: https://github.com/apache/hbase/pull/4182#discussion_r823278698



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java
##########
@@ -1335,11 +1335,14 @@ public boolean hasRegionMemStoreReplication() {
      * @return the modifyable TD
      */
     public ModifyableTableDescriptor setRegionMemStoreReplication(boolean 
memstoreReplication) {
-      setValue(REGION_MEMSTORE_REPLICATION_KEY, 
Boolean.toString(memstoreReplication));
-      // If the memstore replication is setup, we do not have to wait for 
observing a flush event
+      ModifyableTableDescriptor returnDesc =
+          setValue(REGION_MEMSTORE_REPLICATION_KEY, 
Boolean.toString(memstoreReplication));
+      // If the memstore replication not setup, we do not have to wait for 
observing a flush event
       // from primary before starting to serve reads, because gaps from 
replication is not applicable
-      return setValue(REGION_REPLICA_WAIT_FOR_PRIMARY_FLUSH_CONF_KEY,
-              Boolean.toString(memstoreReplication));
+      if (!memstoreReplication) {

Review comment:
       @Apache9 ,  you mean it is better to remove the  additional 
   ` 
setValue(REGION_REPLICA_WAIT_FOR_PRIMARY_FLUSH_CONF_KEY,Boolean.toString(memstoreReplication))`
 from  `TableDescriptorBuilder.setRegionMemStoreReplication` , yes , these two 
configuration items are not necessarily related.




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