You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zihaoAK47 (via GitHub)" <gi...@apache.org> on 2023/06/09 02:42:36 UTC

[GitHub] [shardingsphere] zihaoAK47 opened a new pull request, #26207: Add sys tables

zihaoAK47 opened a new pull request, #26207:
URL: https://github.com/apache/shardingsphere/pull/26207

   Refer #26106.
   
   Changes proposed in this pull request:
     - Add Mysql host_summary_by_statement_type table
     - Add sys_config and host_summary_by_statement_type test
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ✓] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ✓] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ✓] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ✓] I have added corresponding unit tests for my changes.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zihaoAK47 commented on pull request #26207: Add sys tables

Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 commented on PR #26207:
URL: https://github.com/apache/shardingsphere/pull/26207#issuecomment-1583908644

   @strongduanmu Hi mentor, I tried to submit a pull request for sys.host_summary_by_statement_type. please review


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] strongduanmu commented on pull request #26207: Add sys tables

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on PR #26207:
URL: https://github.com/apache/shardingsphere/pull/26207#issuecomment-1583960824

   Hi @zihaoAK47, can you comment on the issue? I will assign it to you.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #26207: Add sys tables

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #26207:
URL: https://github.com/apache/shardingsphere/pull/26207#discussion_r1223840395


##########
infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java:
##########
@@ -70,7 +70,7 @@ public enum SystemSchemaBuilderRule {
             "socket_summary_by_event_name", "socket_summary_by_instance", "status_by_account", "status_by_host", "status_by_thread", "status_by_user", "table_handles",
             "table_io_waits_summary_by_index_usage", "table_io_waits_summary_by_table", "table_lock_waits_summary_by_table", "threads", "user_variables_by_thread", "users", "variables_by_thread"))),
     
-    MYSQL_SYS("MySQL", "sys", new HashSet<>(Collections.singleton("sys"))),
+    MYSQL_SYS("MySQL", "sys", new HashSet<>(new HashSet<>(Arrays.asList("sys", "host_summary_by_statement_type")))),

Review Comment:
   Why it has two hashset?



##########
test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_sys_host_summary_by_statement_type.xml:
##########
@@ -0,0 +1,31 @@
+<!--
+  ~ 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.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="host" />
+        <column name="statement" />
+        <column name="total" />
+        <column name="total_latency" />
+        <column name="max_latency" />
+        <column name="lock_latency" />
+        <column name="rows_sent" />
+        <column name="rows_examined" />
+        <column name="rows_affected" />
+        <column name="full_scans" />
+    </metadata>
+</dataset>

Review Comment:
   Please add new line at the end of file.



##########
test/e2e/sql/src/test/resources/cases/dql/dataset/db/select_mysql_sys_sys_config.xml:
##########
@@ -0,0 +1,25 @@
+<!--
+  ~ 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.
+  -->
+
+<dataset>
+    <metadata>
+        <column name="variable" />
+        <column name="value" />
+        <column name="set_time" />
+        <column name="set_by" />
+    </metadata>
+</dataset>

Review Comment:
   Please add new line at the end of file.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] boyjoy1127 commented on pull request #26207: Add sys tables

Posted by "boyjoy1127 (via GitHub)" <gi...@apache.org>.
boyjoy1127 commented on PR #26207:
URL: https://github.com/apache/shardingsphere/pull/26207#issuecomment-1585976997

   Will this issue be completed before June 15 which is the final date of version 5.4.0?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zihaoAK47 closed pull request #26207: Add sys tables

Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 closed pull request #26207: Add sys tables
URL: https://github.com/apache/shardingsphere/pull/26207


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zihaoAK47 commented on a diff in pull request #26207: Add sys tables

Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 commented on code in PR #26207:
URL: https://github.com/apache/shardingsphere/pull/26207#discussion_r1223845867


##########
infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/builder/SystemSchemaBuilderRule.java:
##########
@@ -70,7 +70,7 @@ public enum SystemSchemaBuilderRule {
             "socket_summary_by_event_name", "socket_summary_by_instance", "status_by_account", "status_by_host", "status_by_thread", "status_by_user", "table_handles",
             "table_io_waits_summary_by_index_usage", "table_io_waits_summary_by_table", "table_lock_waits_summary_by_table", "threads", "user_variables_by_thread", "users", "variables_by_thread"))),
     
-    MYSQL_SYS("MySQL", "sys", new HashSet<>(Collections.singleton("sys"))),
+    MYSQL_SYS("MySQL", "sys", new HashSet<>(new HashSet<>(Arrays.asList("sys", "host_summary_by_statement_type")))),

Review Comment:
   Sorry for being careless, it has been corrected :astonished: 



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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