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 2021/11/18 11:11:47 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

TeslaCN opened a new issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688


   ## Bug Report
   
   Related to #11583.
   
   ### Which version of ShardingSphere did you use?
   master - 8f40f0ca56d1e6f49dbaafee2a686df0cff50b50
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere Proxy
   
   ### Expected behavior
   No error occurs when benching.
   
   ### Actual behavior
   
   ```
   sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
   
   Running the test with following options:
   Number of threads: 256
   Report intermediate results every 10 second(s)
   Initializing random number generator from current time
   
   
   Initializing worker threads...
   
   Threads started!
   
   FATAL: mysql_stmt_execute() returned error 1815 (Internal error: Can't call commit when autocommit=true) for query 'COMMIT'
   FATAL: `thread_run' function failed: /usr/share/sysbench/oltp_common.lua:422: SQL error, errno = 1815, state = 'HY000': Internal error: Can't call commit when autocommit=true
   FATAL: mysql_stmt_execute() returned error 1815 (Internal error: Can't call commit when autocommit=true) for query 'COMMIT'
   FATAL: `thread_run' function failed: /usr/share/sysbench/oltp_common.lua:422: SQL error, errno = 1815, state = 'HY000': Internal error: Can't call commit when autocommit=true
   FATAL: mysql_stmt_execute() returned error 1815 (Internal error: Can't call commit when autocommit=true) for query 'COMMIT'
   FATAL: `thread_run' function failed: /usr/share/sysbench/oltp_common.lua:422: SQL error, errno = 1815, state = 'HY000': Internal error: Can't call commit when autocommit=true
   ```
   
   ### Reason analyze (If you can)
   
   https://github.com/apache/shardingsphere/blob/9577dfd7b5a3279165bbc650cad8f062b70f4923/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/command/CommandExecutorTask.java#L81-L88
   
   After moving the `flush` to the last, this issue didn't reproduced.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   Bench ShardingSphere MySQL Proxy with `sysbench`.
   


-- 
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] terrymanu closed issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688


   


-- 
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 issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688#issuecomment-973776463


   I capture the network by `tcpdump` and the interaction seems normal.
   
   
   


-- 
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 issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688#issuecomment-973719788


   ![image](https://user-images.githubusercontent.com/20503072/142563829-742608b6-fa1c-4b14-b3dc-9edd11b2c11b.png)
   


-- 
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 issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688#issuecomment-973722113


   ![image](https://user-images.githubusercontent.com/20503072/142564269-fef266b9-a917-4fe7-8f99-f8b806751604.png)
   ![image](https://user-images.githubusercontent.com/20503072/142564311-a2d1e817-45a7-408a-9f62-d1c87ac5a73a.png)
   


-- 
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 issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688#issuecomment-973723985


   Before release the connectionStatus, the `inTransaction` was `false`. But before changing the `using` to `false`, the `inTransaction` became `true`. Does it mean the `resourceLock` in `connectionStatus` doesn't work?


-- 
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 issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688#issuecomment-972820311


   ![image](https://user-images.githubusercontent.com/20503072/142415114-d9dc372d-1289-4a54-ac22-0e82a094222e.png)
   


-- 
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 issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688#issuecomment-973716342


   ![image](https://user-images.githubusercontent.com/20503072/142563081-0f78703a-a475-4aa5-b44d-fce513d0db17.png)
   ![image](https://user-images.githubusercontent.com/20503072/142563118-a5dff6b1-49a0-44b5-b01f-69603e64d9d1.png)
   


-- 
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 issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688#issuecomment-973774425


   I tried delaying the flush and no error occurred.
   
   ![image](https://user-images.githubusercontent.com/20503072/142572122-75b9deaf-37f6-43d9-9a4a-aff2f48df277.png)
   
   ```
   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Transaction on <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
   sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
   
   Running the test with following options:
   Number of threads: 256
   Report intermediate results every 10 second(s)
   Initializing random number generator from current time
   
   
   Initializing worker threads...
   
   Threads started!
   
   [ 10s ] thds: 256 tps: 6135.93 qps: 98373.74 (r/w/o: 61514.86/24561.72/12297.15) lat (ms,99%): 167.44 err/s: 0.00 reconn/s: 0.00
   [ 20s ] thds: 256 tps: 12272.42 qps: 196369.16 (r/w/o: 122734.06/49088.46/24546.63) lat (ms,99%): 55.82 err/s: 0.00 reconn/s: 0.00
   [ 30s ] thds: 256 tps: 14143.62 qps: 226290.65 (r/w/o: 141427.12/56575.09/28288.44) lat (ms,99%): 41.10 err/s: 0.00 reconn/s: 0.00
   [ 40s ] thds: 256 tps: 14046.37 qps: 224741.09 (r/w/o: 140464.65/56182.90/28093.55) lat (ms,99%): 35.59 err/s: 0.00 reconn/s: 0.00
   [ 50s ] thds: 256 tps: 14140.53 qps: 226256.35 (r/w/o: 141411.35/56562.54/28282.47) lat (ms,99%): 33.12 err/s: 0.00 reconn/s: 0.00
   [ 60s ] thds: 256 tps: 14152.39 qps: 226417.04 (r/w/o: 141508.70/56601.66/28306.68) lat (ms,99%): 31.94 err/s: 0.00 reconn/s: 0.00
   [ 70s ] thds: 256 tps: 14142.52 qps: 226297.50 (r/w/o: 141440.19/56570.57/28286.74) lat (ms,99%): 31.94 err/s: 0.00 reconn/s: 0.00
   [ 80s ] thds: 256 tps: 14183.69 qps: 226925.48 (r/w/o: 141822.82/56733.77/28368.88) lat (ms,99%): 31.37 err/s: 0.00 reconn/s: 0.00
   [ 90s ] thds: 256 tps: 14113.63 qps: 225834.43 (r/w/o: 141150.43/56455.43/28228.57) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 100s ] thds: 256 tps: 13998.32 qps: 223964.80 (r/w/o: 139977.68/55989.97/27997.14) lat (ms,99%): 35.59 err/s: 0.00 reconn/s: 0.00
   [ 110s ] thds: 256 tps: 14173.11 qps: 226777.49 (r/w/o: 141734.72/56695.85/28346.92) lat (ms,99%): 30.81 err/s: 0.00 reconn/s: 0.00
   [ 120s ] thds: 256 tps: 14165.34 qps: 226646.75 (r/w/o: 141654.40/56660.36/28331.98) lat (ms,99%): 31.37 err/s: 0.00 reconn/s: 0.00
   [ 130s ] thds: 256 tps: 14146.07 qps: 226325.78 (r/w/o: 141452.98/56579.07/28293.74) lat (ms,99%): 31.94 err/s: 0.00 reconn/s: 0.00
   [ 140s ] thds: 256 tps: 14158.62 qps: 226551.59 (r/w/o: 141595.58/56637.67/28318.34) lat (ms,99%): 31.37 err/s: 0.00 reconn/s: 0.00
   [ 150s ] thds: 256 tps: 14159.95 qps: 226548.74 (r/w/o: 141591.66/56635.89/28321.19) lat (ms,99%): 31.37 err/s: 0.00 reconn/s: 0.00
   [ 160s ] thds: 256 tps: 11876.68 qps: 190155.41 (r/w/o: 118866.61/47534.43/23754.36) lat (ms,99%): 61.08 err/s: 0.00 reconn/s: 0.00
   [ 170s ] thds: 256 tps: 2309.97 qps: 36824.35 (r/w/o: 22995.95/9208.86/4619.53) lat (ms,99%): 1129.24 err/s: 0.00 reconn/s: 0.00
   [ 180s ] thds: 256 tps: 14041.40 qps: 224689.29 (r/w/o: 140432.99/56172.50/28083.80) lat (ms,99%): 33.72 err/s: 0.00 reconn/s: 0.00
   [ 190s ] thds: 256 tps: 14165.19 qps: 226622.21 (r/w/o: 141639.54/56651.28/28331.39) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 200s ] thds: 256 tps: 14186.21 qps: 226971.25 (r/w/o: 141854.69/56743.14/28373.42) lat (ms,99%): 31.37 err/s: 0.00 reconn/s: 0.00
   [ 210s ] thds: 256 tps: 14156.43 qps: 226510.90 (r/w/o: 141570.61/56626.42/28313.86) lat (ms,99%): 31.37 err/s: 0.00 reconn/s: 0.00
   [ 220s ] thds: 256 tps: 14098.56 qps: 225588.28 (r/w/o: 140994.11/56395.94/28198.22) lat (ms,99%): 34.33 err/s: 0.00 reconn/s: 0.00
   [ 230s ] thds: 256 tps: 14183.21 qps: 226920.96 (r/w/o: 141823.60/56730.64/28366.72) lat (ms,99%): 31.37 err/s: 0.00 reconn/s: 0.00
   [ 240s ] thds: 256 tps: 14203.29 qps: 227255.92 (r/w/o: 142037.35/56811.28/28407.29) lat (ms,99%): 30.81 err/s: 0.00 reconn/s: 0.00
   [ 250s ] thds: 256 tps: 14158.11 qps: 226531.08 (r/w/o: 141581.01/56632.15/28317.92) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 260s ] thds: 256 tps: 14192.78 qps: 227068.80 (r/w/o: 141914.41/56767.73/28386.66) lat (ms,99%): 31.94 err/s: 0.00 reconn/s: 0.00
   [ 270s ] thds: 256 tps: 14134.52 qps: 226168.46 (r/w/o: 141358.86/56539.66/28269.93) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 280s ] thds: 256 tps: 14022.47 qps: 224345.62 (r/w/o: 140212.60/56087.38/28045.64) lat (ms,99%): 35.59 err/s: 0.00 reconn/s: 0.00
   [ 290s ] thds: 256 tps: 14143.23 qps: 226303.13 (r/w/o: 141441.13/56575.13/28286.87) lat (ms,99%): 31.94 err/s: 0.00 reconn/s: 0.00
   [ 300s ] thds: 256 tps: 14158.79 qps: 226529.39 (r/w/o: 141577.07/56633.45/28318.87) lat (ms,99%): 31.37 err/s: 0.00 reconn/s: 0.00
   [ 310s ] thds: 256 tps: 14163.50 qps: 226630.50 (r/w/o: 141646.80/56655.60/28328.10) lat (ms,99%): 31.94 err/s: 0.00 reconn/s: 0.00
   [ 320s ] thds: 256 tps: 14127.09 qps: 226037.61 (r/w/o: 141277.14/56505.68/28254.79) lat (ms,99%): 31.94 err/s: 0.00 reconn/s: 0.00
   [ 330s ] thds: 256 tps: 6305.71 qps: 101007.39 (r/w/o: 63146.92/25248.05/12612.43) lat (ms,99%): 530.08 err/s: 0.00 reconn/s: 0.00
   [ 340s ] thds: 256 tps: 11191.54 qps: 178942.68 (r/w/o: 111818.65/44741.55/22382.48) lat (ms,99%): 173.58 err/s: 0.00 reconn/s: 0.00
   [ 350s ] thds: 256 tps: 14135.08 qps: 226159.92 (r/w/o: 141349.36/56539.31/28271.25) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 360s ] thds: 256 tps: 14116.03 qps: 225869.65 (r/w/o: 141169.74/56466.84/28233.07) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 370s ] thds: 256 tps: 14140.21 qps: 226226.92 (r/w/o: 141393.97/56551.03/28281.91) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 380s ] thds: 256 tps: 14158.61 qps: 226515.39 (r/w/o: 141567.36/56629.42/28318.61) lat (ms,99%): 31.37 err/s: 0.00 reconn/s: 0.00
   [ 390s ] thds: 256 tps: 14062.38 qps: 225035.37 (r/w/o: 140651.89/56257.12/28126.36) lat (ms,99%): 33.72 err/s: 0.00 reconn/s: 0.00
   [ 400s ] thds: 256 tps: 14052.35 qps: 224828.62 (r/w/o: 140517.15/56205.68/28105.79) lat (ms,99%): 33.12 err/s: 0.00 reconn/s: 0.00
   [ 410s ] thds: 256 tps: 14122.26 qps: 225961.88 (r/w/o: 141226.91/56489.34/28245.62) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 420s ] thds: 256 tps: 14103.88 qps: 225653.55 (r/w/o: 141030.38/56414.11/28209.06) lat (ms,99%): 31.94 err/s: 0.00 reconn/s: 0.00
   [ 430s ] thds: 256 tps: 14107.83 qps: 225711.10 (r/w/o: 141067.45/56428.10/28215.55) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 440s ] thds: 256 tps: 14114.54 qps: 225837.18 (r/w/o: 141149.52/56457.37/28230.28) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 450s ] thds: 256 tps: 14089.17 qps: 225430.17 (r/w/o: 140896.27/56353.47/28180.43) lat (ms,99%): 33.12 err/s: 0.00 reconn/s: 0.00
   [ 460s ] thds: 256 tps: 14048.49 qps: 224787.80 (r/w/o: 140491.97/56198.75/28097.07) lat (ms,99%): 34.33 err/s: 0.00 reconn/s: 0.00
   [ 470s ] thds: 256 tps: 14114.53 qps: 225834.33 (r/w/o: 141146.47/56458.81/28229.05) lat (ms,99%): 33.12 err/s: 0.00 reconn/s: 0.00
   [ 480s ] thds: 256 tps: 14124.36 qps: 225970.27 (r/w/o: 141229.71/56490.74/28249.82) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 490s ] thds: 256 tps: 14109.36 qps: 225760.00 (r/w/o: 141100.76/56441.22/28218.01) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 500s ] thds: 256 tps: 6565.01 qps: 105033.40 (r/w/o: 65645.96/26255.93/13131.51) lat (ms,99%): 390.30 err/s: 0.00 reconn/s: 0.00
   [ 510s ] thds: 256 tps: 14091.14 qps: 225466.55 (r/w/o: 140916.01/56367.76/28182.78) lat (ms,99%): 33.12 err/s: 0.00 reconn/s: 0.00
   [ 520s ] thds: 256 tps: 14008.68 qps: 224135.30 (r/w/o: 140084.71/56032.13/28018.46) lat (ms,99%): 34.95 err/s: 0.00 reconn/s: 0.00
   [ 530s ] thds: 256 tps: 14157.43 qps: 226526.86 (r/w/o: 141581.75/56629.24/28315.87) lat (ms,99%): 31.94 err/s: 0.00 reconn/s: 0.00
   [ 540s ] thds: 256 tps: 14085.90 qps: 225372.86 (r/w/o: 140857.68/56342.99/28172.20) lat (ms,99%): 33.72 err/s: 0.00 reconn/s: 0.00
   [ 550s ] thds: 256 tps: 14076.27 qps: 225211.24 (r/w/o: 140756.15/56301.76/28153.33) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 560s ] thds: 256 tps: 14116.43 qps: 225877.63 (r/w/o: 141174.67/56469.91/28233.05) lat (ms,99%): 32.53 err/s: 0.00 reconn/s: 0.00
   [ 570s ] thds: 256 tps: 14089.17 qps: 225426.78 (r/w/o: 140892.84/56355.19/28178.75) lat (ms,99%): 33.72 err/s: 0.00 reconn/s: 0.00
   [ 580s ] thds: 256 tps: 13981.03 qps: 223680.72 (r/w/o: 139800.23/55917.13/27963.37) lat (ms,99%): 35.59 err/s: 0.00 reconn/s: 0.00
   [ 590s ] thds: 256 tps: 14097.12 qps: 225551.75 (r/w/o: 140966.62/56391.39/28193.74) lat (ms,99%): 33.12 err/s: 0.00 reconn/s: 0.00
   [ 600s ] thds: 256 tps: 14071.17 qps: 225142.61 (r/w/o: 140714.40/56284.68/28143.54) lat (ms,99%): 33.12 err/s: 0.00 reconn/s: 0.00
   SQL statistics:
       queries performed:
           read:                            80633110
           write:                           32252690
           other:                           16127176
           total:                           129012976
       transactions:                        8063311 (13414.53 per sec.)
       queries:                             129012976 (214632.47 per sec.)
       ignored errors:                      0      (0.00 per sec.)
       reconnects:                          0      (0.00 per sec.)
   
   General statistics:
       total time:                          601.0863s
       total number of events:              8063311
   
   Latency (ms):
            min:                                    3.80
            avg:                                   19.08
            max:                                 2611.95
            99th percentile:                       39.65
            sum:                            153858244.84
   
   Threads fairness:
       events (avg/stddev):           31497.3086/3582.35
       execution time (avg/stddev):   601.0088/0.03
   
   ```


-- 
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 edited a comment on issue #13688: BackendConnection#connectionPostProcessors are cleared unexpectedly in ShardingSphere Proxy

Posted by GitBox <gi...@apache.org>.
TeslaCN edited a comment on issue #13688:
URL: https://github.com/apache/shardingsphere/issues/13688#issuecomment-973776463


   I capture the network by `tcpdump` and the interaction seems normal.
   
   ![image](https://user-images.githubusercontent.com/20503072/142572744-589671b2-a163-4e6b-b210-341f2e32d85d.png)
   
   [1637288860.zip](https://github.com/apache/shardingsphere/files/7568088/1637288860.zip)
   


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