Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错:execute acquire lock failure, key is: AsyncCommitting #5684

Closed
1 task done
Hugeshe opened this issue Jun 29, 2023 · 3 comments
Closed
1 task done

报错:execute acquire lock failure, key is: AsyncCommitting #5684

Hugeshe opened this issue Jun 29, 2023 · 3 comments
Labels
task: help-wanted Extra attention is needed type: bug Category issues or prs related to bug.

Comments

@Hugeshe
Copy link

Hugeshe commented Jun 29, 2023

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

部署了seata server的集群,升级到1.6.1版本后,发现server端经常报一个分布式锁相关的错

Ⅱ. Describe what happened

代码看下来发现,这是一个用于保证集群中同时间只有一个server能够处理提交或回滚的机制,但是问题在于这里的锁竞争要报太多无谓的error日志了

If there is an exception, please attach the exception trace:

current_version=428dbfd9ee6cdaf9223750f3a2785f9f _process=412 _threadName=RetryRollbacking_1_1 _language=java _msg=execute acquire lock failure, key is: RetryRollbacking
java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
	at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1288)
	at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:794)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2034)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
	at io.seata.server.storage.db.lock.DataBaseDistributedLocker.getDistributedLockDO(DataBaseDistributedLocker.java:211)
	at io.seata.server.storage.db.lock.DataBaseDistributedLocker.acquireLock(DataBaseDistributedLocker.java:115)
	at io.seata.server.session.SessionHolder.acquireDistributedLock(SessionHolder.java:376)
	at io.seata.server.session.SessionHolder.distributedLockAndExecute(SessionHolder.java:398)
	at io.seata.server.coordinator.DefaultCoordinator.lambda$init$49(DefaultCoordinator.java:489)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

Ⅲ. Describe what you expected to happen

想问问有没有办法可以避免这些报错,比如说有没有什么配置能够指定其中一台机器进行这些工作,而不用多台机器竞争这个分布式锁,或者能不能干脆关停这个分布式锁机制,我记得之前1.4版本里头是没有的。

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. 集群部署即可重现

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version(e.g. java -version):1.8
  • Seata client/server version: 1.6.1
  • Database version:5.27
  • OS(e.g. uname -a):
  • Others:
@slievrly slievrly added task: help-wanted Extra attention is needed type: bug Category issues or prs related to bug. labels Jul 4, 2023
@slievrly
Copy link
Member

slievrly commented Jul 4, 2023

@Hugeshe will fix in 1.7.0, ref #5700

@Hugeshe
Copy link
Author

Hugeshe commented Jul 5, 2023

@Hugeshe will fix in 1.7.0, ref #5700

thanks a lot!

@slievrly
Copy link
Member

@Hugeshe You can test if this issue exists with the latest version 1.7.
https://github.com/seata/seata/releases/tag/v1.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task: help-wanted Extra attention is needed type: bug Category issues or prs related to bug.
Projects
None yet
Development

No branches or pull requests

3 participants