k8s环境出现,pod锁定的情况,老的pod不解除锁定,新的pod就无法加入

By running the following command:

select * from DATABASECHANGELOGLOCK;

You should be able to check the lockedby column to see who locked the table. Generally, the lock will be from the local machine.

Assuming this is the case (and no other machine has a lock on the database), this should resolve the issue:

Execute the following SQL query against the database:

update DATABASECHANGELOGLOCK
set locked=0, lockgranted=null, lockedby=null
where id=1

Please let us know if you encounter any issues.

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐