Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- get_lock('test1', 200) in session 1;
- SELECT GET_LOCK('test1',0), GET_LOCK('test2',0); in session 2;
- close the network and two sessions are disconnected;
- reconnect the network
- check with select * from information_schema.data_lock_waits;
- get_lock('test1', 200) in session 3;
- get_lock('test2',200) in session 4;
2. What did you expect to see? (Required)
for step 6: expect return 1
for step 7: expect return 1
3. What did you see instead (Required)
-
after reconnect, lock test1 and test2 can't acquire in any session
-
test2 was never acquired successfully by any session, and can't find wait_lock in data_lock_waits table, why can't it be acquired after reconnecting?
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+--------------------+------------------------+------------------------------------------------------------------+-----------------+
| KEY | KEY_INFO | TRX_ID | CURRENT_HOLDING_TRX_ID | SQL_DIGEST | SQL_DIGEST_TEXT |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+--------------------+------------------------+------------------------------------------------------------------+-----------------+
| 7480000000000000435F698000000000000001017465737431000000FC | {"db_id":3,"db_name":"mysql","table_id":67,"table_name":"advisory_locks","index_id":1,"index_name":"PRIMARY","index_values":["test1"]} | 433260456328298499 | 433260404148535299 | 503fd5b0bd3ca476326b20cdb82e8088bb82376f9a3b81c2f1887bcf46bb3da6 | NULL |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+--------------------+------------------------+------------------------------------------------------------------+-----------------+
1 row in set (0.01 sec)
mysql> select get_lock('test2',200);
+-----------------------+
| get_lock('test2',200) |
+-----------------------+
| 0 |
+-----------------------+
1 row in set (3 min 20.01 sec)
4. What is your TiDB version? (Required)
| Release Version: v6.1.0-alpha
Edition: Community
Git Commit Hash: 90e24b9
Git Branch: heads/refs/tags/v6.1.0-alpha
UTC Build Time: 2022-05-15 14:57:27
GoVersion: go1.18
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
Activity