You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/04/08 14:46:06 UTC

[GitHub] [shardingsphere] RaigorJiang opened a new pull request, #16678: Optimize performance, log MDC information only when sql-show is enabled.

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

   Optimize performance, log MDC information only when sql-show is enabled.


-- 
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] codecov-commenter commented on pull request #16678: Optimize performance, log MDC information only when sql-show is enabled.

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #16678:
URL: https://github.com/apache/shardingsphere/pull/16678#issuecomment-1093669287

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/16678?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#16678](https://codecov.io/gh/apache/shardingsphere/pull/16678?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d53792e) into [master](https://codecov.io/gh/apache/shardingsphere/commit/859d2f0ebc3d3fff0af799b6f150005bc47dc953?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (859d2f0) will **decrease** coverage by `0.00%`.
   > The diff coverage is `58.53%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #16678      +/-   ##
   ============================================
   - Coverage     60.56%   60.56%   -0.01%     
   + Complexity     2115     2114       -1     
   ============================================
     Files          3382     3385       +3     
     Lines         50881    50885       +4     
     Branches       8733     8735       +2     
   ============================================
   + Hits          30817    30819       +2     
   - Misses        17473    17474       +1     
   - Partials       2591     2592       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/16678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...tency/CRC32MatchDataConsistencyCheckAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL2NvcmUvc3BpL2NoZWNrL2NvbnNpc3RlbmN5L0NSQzMyTWF0Y2hEYXRhQ29uc2lzdGVuY3lDaGVja0FsZ29yaXRobS5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...stency/DataMatchDataConsistencyCheckAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL2NvcmUvc3BpL2NoZWNrL2NvbnNpc3RlbmN5L0RhdGFNYXRjaERhdGFDb25zaXN0ZW5jeUNoZWNrQWxnb3JpdGhtLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...pi/RuleAlteredContextManagerLifecycleListener.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL3NjZW5hcmlvL3J1bGVhbHRlcmVkL3NwaS9SdWxlQWx0ZXJlZENvbnRleHRNYW5hZ2VyTGlmZWN5Y2xlTGlzdGVuZXIuamF2YQ==) | `0.00% <ø> (ø)` | |
   | [...sphere/proxy/initializer/BootstrapInitializer.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYm9vdHN0cmFwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9pbml0aWFsaXplci9Cb290c3RyYXBJbml0aWFsaXplci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...phere/spi/type/singleton/SingletonSPIRegistry.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zcGkvdHlwZS9zaW5nbGV0b24vU2luZ2xldG9uU1BJUmVnaXN0cnkuamF2YQ==) | `100.00% <ø> (ø)` | |
   | [...hardingsphere/spi/type/typed/TypedSPIRegistry.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zcGkvdHlwZS90eXBlZC9UeXBlZFNQSVJlZ2lzdHJ5LmphdmE=) | `92.59% <ø> (ø)` | |
   | [...sql/common/statement/ddl/DropTriggerStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3N0YXRlbWVudC9kZGwvRHJvcFRyaWdnZXJTdGF0ZW1lbnQuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...postgresql/ddl/PostgreSQLDropTriggerStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9zdGF0ZW1lbnQvcG9zdGdyZXNxbC9kZGwvUG9zdGdyZVNRTERyb3BUcmlnZ2VyU3RhdGVtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...uery/ShowScalingCheckAlgorithmsQueryResultSet.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctZGlzdHNxbC9zaGFyZGluZ3NwaGVyZS1zaGFyZGluZy1kaXN0c3FsLWhhbmRsZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvZGlzdHNxbC9oYW5kbGVyL3F1ZXJ5L1Nob3dTY2FsaW5nQ2hlY2tBbGdvcml0aG1zUXVlcnlSZXN1bHRTZXQuamF2YQ==) | `86.66% <50.00%> (ø)` | |
   | [.../pipeline/mysql/ingest/MySQLIncrementalDumper.java](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1kaWFsZWN0L3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUtbXlzcWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RhdGEvcGlwZWxpbmUvbXlzcWwvaW5nZXN0L015U1FMSW5jcmVtZW50YWxEdW1wZXIuamF2YQ==) | `73.56% <50.00%> (-0.07%)` | :arrow_down: |
   | ... and [12 more](https://codecov.io/gh/apache/shardingsphere/pull/16678/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/16678?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/16678?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5b83c49...d53792e](https://codecov.io/gh/apache/shardingsphere/pull/16678?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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] RaigorJiang commented on a diff in pull request #16678: Optimize performance, log MDC information only when sql-show is enabled.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #16678:
URL: https://github.com/apache/shardingsphere/pull/16678#discussion_r846980729


##########
shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java:
##########
@@ -66,8 +69,11 @@
     @Override
     public void run() {
         boolean isNeedFlush = false;
+        boolean sqlShowEnabled = isSQLShowEnabled();

Review Comment:
   Thank you @TeslaCN , updated.



-- 
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] RaigorJiang commented on a diff in pull request #16678: Optimize performance, log MDC information only when sql-show is enabled.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #16678:
URL: https://github.com/apache/shardingsphere/pull/16678#discussion_r846565657


##########
shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java:
##########
@@ -66,8 +69,9 @@
     @Override
     public void run() {
         boolean isNeedFlush = false;
+        boolean sqlShowEnabled = isSQLShowEnabled();
         try (PacketPayload payload = databaseProtocolFrontendEngine.getCodecEngine().createPacketPayload((ByteBuf) message, context.channel().attr(CommonConstants.CHARSET_ATTRIBUTE_KEY).get())) {
-            fillLogMDC();
+            fillLogMDC(sqlShowEnabled);

Review Comment:
   Sure, thanks for your advice.  😀



-- 
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] TeslaCN commented on a diff in pull request #16678: Optimize performance, log MDC information only when sql-show is enabled.

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on code in PR #16678:
URL: https://github.com/apache/shardingsphere/pull/16678#discussion_r846922622


##########
shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java:
##########
@@ -66,8 +69,11 @@
     @Override
     public void run() {
         boolean isNeedFlush = false;
+        boolean sqlShowEnabled = isSQLShowEnabled();

Review Comment:
   ```suggestion
           boolean sqlShowEnabled = ProxyContext.getInstance().getContextManager().getMetaDataContexts().getProps().getValue(ConfigurationPropertyKey.SQL_SHOW);
   ```
   Could we consider doing inline manually?



-- 
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] TeslaCN merged pull request #16678: Optimize performance, log MDC information only when sql-show is enabled.

Posted by GitBox <gi...@apache.org>.
TeslaCN merged PR #16678:
URL: https://github.com/apache/shardingsphere/pull/16678


-- 
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] TeslaCN commented on a diff in pull request #16678: Optimize performance, log MDC information only when sql-show is enabled.

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on code in PR #16678:
URL: https://github.com/apache/shardingsphere/pull/16678#discussion_r846306866


##########
shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java:
##########
@@ -66,8 +69,9 @@
     @Override
     public void run() {
         boolean isNeedFlush = false;
+        boolean sqlShowEnabled = isSQLShowEnabled();
         try (PacketPayload payload = databaseProtocolFrontendEngine.getCodecEngine().createPacketPayload((ByteBuf) message, context.channel().attr(CommonConstants.CHARSET_ATTRIBUTE_KEY).get())) {
-            fillLogMDC();
+            fillLogMDC(sqlShowEnabled);

Review Comment:
   Could we consider checking the value before entering the method?



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