top-think / top-think/think-orm

高并发插入数据出现 MYSQL | ERROR 1305(42000) SAVEPOINT trans*** DOES NOT EXIST

Open
#182 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
437
Forks
188
PR merge metrics
No merged PRs in 30d

Description

MYSQL | ERROR 1305(42000) SAVEPOINT trans*** DOES NOT EXIST

看源码Model.php insertData 和 updateData 方法都默认使用了事务处理 在高并发插入数据的情况下出现了

MYSQL | ERROR 1305(42000) SAVEPOINT trans*** DOES NOT EXIST 导致插入数据被rollback

我应该如何处理?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Model.php, focusing on the insertData and updateData methods and their transaction handling. Reproduce the high-concurrency insert scenario against MySQL and trace when the trans*** savepoint is created or removed. Done means the cause of ERROR 1305 is identified and the issue has a confirmed fix or documented handling guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.