matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.78k stars 276 forks source link

[Bug]: connections on draining CN are not listed in processlist() #17687

Open aylei opened 3 months ago

aylei commented 3 months ago

Is there an existing issue for the same bug?

Branch Name

v1.2.2

Commit ID

dc29a3623

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

mysql> show backend servers;
+--------------------------------------+---------------------+------------+-----------------------------------------------+
| UUID                                 | Address             | Work State | Labels                                        |
+--------------------------------------+---------------------+------------+-----------------------------------------------+
| 66303061-3137-6138-6230-653961313364 | 172.20.176.4:6001   | Working    | account:01902597-9796-7df7-98bc-c96e62875810; |
| 32646164-6635-3831-6464-663162353030 | 172.20.175.132:6001 | Working    | account:01903343-d658-79b0-81bf-80a70b9702f3; |
| 63613261-3739-3132-3534-383261663034 | 172.20.174.4:6001   | Working    | account:01902597-9796-7df7-98bc-c96e62875810; |
| 64333135-3266-6437-6436-653439356538 | 172.20.172.132:6001 | Working    | account:018f2df1_48f8_7e70_a2bc_83650c8f8f13; |
| 33313439-3330-3436-3530-336262626131 | 172.20.165.133:6001 | Working    | account:*;role:__MO_OB__;                     |
| 64646661-3465-3663-3065-636132663536 | 172.20.173.132:6001 | Draining   | dummy:pool;                                   |
| 33373136-6563-3665-6566-613961303233 | 172.20.100.4:6001   | Draining   |                                               |
| 39306433-6634-6562-3037-356263393936 | 172.20.163.5:6001   | Working    | account:01909fd6-0c54-7329-b241-f02df36f0d8e; |
| 36316661-3861-3736-6336-316132653834 | 172.20.124.3:6001   | Working    | account:0190c3c1-9a99-73e0-9f50-13c2e67066fc; |
| 38646239-3731-6566-3635-353732623766 | 172.20.176.132:6001 | Working    | account:01903344-e0a1-7ec0-b0e2-bf4d140b0976; |
| 66323466-3366-6538-3463-653536386166 | 172.20.172.4:6001   | Working    | account:018ebb8c_8a3b_7e72_83e6_bd4cd1c40a78; |
| 37313665-3736-6633-6261-343833303962 | 172.20.122.132:6001 | Working    |                                               |
| 39343638-3562-6534-3363-366137636365 | 172.20.173.4:6001   | Working    | account:01903344-4d60-7fb3-8a5d-02dafaf20ebc; |
| 32623963-6531-3162-3033-613035373237 | 172.20.175.4:6001   | Working    | account:018f0a00_0bc9_75bd_a460_67690ee76efc; |
+--------------------------------------+---------------------+------------+-----------------------------------------------+
14 rows in set (0.12 sec)

mysql> select * from processlist() a where conn_id=connection_id();
Empty set (0.02 sec)

Expected Behavior

mysql> select * from processlist() a where conn_id=connection_id();

should never return empty set

Steps to Reproduce

1. Connect to a CN server through proxy;
2. Start a txn;
3. Offline the CN:

k -n freetier-01 label pod ${CN_POD} apps.kruise.io/specified-delete=y
  1. Check processlist()
mysql> select * from processlist() a where conn_id=connection_id();
Empty set (0.02 sec)


### Additional information

_No response_
volgariver6 commented 3 months ago

fixed

TangxingZhou commented 2 months ago
image image

测试验证通过