morningman commented on a change in pull request #2737: Support replication_num 
setting for table level
URL: https://github.com/apache/incubator-doris/pull/2737#discussion_r367432244
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
 ##########
 @@ -5117,15 +5118,28 @@ public void 
replayModifyTableDynamicPartition(ModifyDynamicPartitionInfo info) {
             OlapTable olapTable = (OlapTable) db.getTable(tableId);
             TableProperty tableProperty = olapTable.getTableProperty();
             if (tableProperty == null) {
-                olapTable.setTableProperty(new 
TableProperty(properties).buildDynamicProperty());
+                olapTable.setTableProperty(new 
TableProperty(properties).buildProperty(opCode));
             } else {
                 tableProperty.modifyTableProperties(properties);
+                tableProperty.buildProperty(opCode);
             }
         } finally {
             db.writeUnlock();
         }
     }
 
+    public void modifyTableReplicationNum(Database db, OlapTable table, 
Map<String, String> properties) throws DdlException {
+        TableProperty tableProperty = table.getTableProperty();
+        if (tableProperty == null) {
+            tableProperty = new TableProperty(properties);
+        } else {
+            tableProperty.modifyTableProperties(properties);
+        }
+        tableProperty.buildReplicationNum();
+        ModifyTablePropertyOperationLog info = new 
ModifyTablePropertyOperationLog(db.getId(), table.getId(), 
table.getTableProperty().getProperties());
 
 Review comment:
   You do not need to log all properties in TableProperty, only `properties` is 
enough

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to