You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "JackDrogon (via GitHub)" <gi...@apache.org> on 2023/06/07 08:54:17 UTC

[GitHub] [doris] JackDrogon opened a new pull request, #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

JackDrogon opened a new pull request, #20550:
URL: https://github.com/apache/doris/pull/20550

   ## Proposed changes
   
    Add AlterDatabasePropertyStmt binlog impl
   
   ```sql
   alter database t1 set properties ("binlog.enable" = "true");
   ```
   
   show
   ```bash
   mysql> show create database t1 \G;
   *************************** 1. row ***************************
          Database: t1
   Create Database: CREATE DATABASE `t1`
   PROPERTIES (
   "binlog.enable" = "true"
   )
   1 row in set (0.01 sec)e" = "true"
   )
   ```
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] JackDrogon commented on a diff in pull request #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

Posted by "JackDrogon (via GitHub)" <gi...@apache.org>.
JackDrogon commented on code in PR #20550:
URL: https://github.com/apache/doris/pull/20550#discussion_r1222574106


##########
fe/fe-core/src/main/java/org/apache/doris/persist/AlterDatabasePropertyInfo.java:
##########
@@ -0,0 +1,65 @@
+// 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.doris.persist;
+
+import org.apache.doris.common.io.Text;
+import org.apache.doris.common.io.Writable;
+import org.apache.doris.persist.gson.GsonUtils;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Map;
+
+public class AlterDatabasePropertyInfo implements Writable {
+    @SerializedName(value = "dbName")
+    private String dbName;

Review Comment:
   DatabaseInfo use dbName,what difference between id and 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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] JackDrogon commented on a diff in pull request #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

Posted by "JackDrogon (via GitHub)" <gi...@apache.org>.
JackDrogon commented on code in PR #20550:
URL: https://github.com/apache/doris/pull/20550#discussion_r1222575024


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -121,6 +121,9 @@ public enum DbState {
     @SerializedName(value = "dbProperties")
     private DatabaseProperty dbProperties = new DatabaseProperty();
 
+    @SerializedName(value = "binlogConfig")
+    private BinlogConfig binlogConfig = new BinlogConfig();

Review Comment:
   I will use it frequently,so maybe cache the binlogConfig is a btter choice.



-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] JackDrogon commented on pull request #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

Posted by "JackDrogon (via GitHub)" <gi...@apache.org>.
JackDrogon commented on PR #20550:
URL: https://github.com/apache/doris/pull/20550#issuecomment-1583919438

   run buildall


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] JackDrogon commented on pull request #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

Posted by "JackDrogon (via GitHub)" <gi...@apache.org>.
JackDrogon commented on PR #20550:
URL: https://github.com/apache/doris/pull/20550#issuecomment-1583918766

   Doc will be added later with other doc. Refer to PR instructions for usage


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] dataroaring merged pull request #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring merged PR #20550:
URL: https://github.com/apache/doris/pull/20550


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20550:
URL: https://github.com/apache/doris/pull/20550#issuecomment-1584140875

   PR approved by at least one committer and no changes requested.


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] JackDrogon commented on pull request #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

Posted by "JackDrogon (via GitHub)" <gi...@apache.org>.
JackDrogon commented on PR #20550:
URL: https://github.com/apache/doris/pull/20550#issuecomment-1583863727

   run buildall


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] morningman commented on a diff in pull request #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on code in PR #20550:
URL: https://github.com/apache/doris/pull/20550#discussion_r1222565612


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -121,6 +121,9 @@ public enum DbState {
     @SerializedName(value = "dbProperties")
     private DatabaseProperty dbProperties = new DatabaseProperty();
 
+    @SerializedName(value = "binlogConfig")
+    private BinlogConfig binlogConfig = new BinlogConfig();

Review Comment:
   Can it be put into `dbProperties`?



##########
fe/fe-core/src/main/java/org/apache/doris/persist/AlterDatabasePropertyInfo.java:
##########
@@ -0,0 +1,65 @@
+// 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.doris.persist;
+
+import org.apache.doris.common.io.Text;
+import org.apache.doris.common.io.Writable;
+import org.apache.doris.persist.gson.GsonUtils;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Map;
+
+public class AlterDatabasePropertyInfo implements Writable {
+    @SerializedName(value = "dbName")
+    private String dbName;

Review Comment:
   Better use database id?



-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #20550: [feature](alter) Add AlterDatabasePropertyStmt binlog impl

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20550:
URL: https://github.com/apache/doris/pull/20550#issuecomment-1584140936

   PR approved by anyone and no changes requested.


-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org