File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
docs/system-design/framework/spring Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ InnoDB 存储引擎在 **分布式事务** 的情况下一般会用到 **SERIALI
513
513
514
514
所谓事务超时,就是指一个事务所允许执行的最长时间,如果超过该时间限制但事务还没有完成,则自动回滚事务。在 ` TransactionDefinition ` 中以 int 的值来表示超时时间,其单位是秒,默认值为-1。
515
515
516
- #### 3.3.3 . 事务只读属性
516
+ #### 3.3.4 . 事务只读属性
517
517
518
518
``` java
519
519
package org.springframework.transaction ;
@@ -545,7 +545,7 @@ public interface TransactionDefinition {
545
545
1 . 如果你一次执行单条查询语句,则没有必要启用事务支持,数据库默认支持 SQL 执行期间的读一致性;
546
546
2 . 如果你一次执行多条查询语句,例如统计查询,报表查询,在这种场景下,多条查询 SQL 必须保证整体的读一致性,否则,在前条 SQL 查询之后,后条 SQL 查询之前,数据被其他用户改变,则该次整体的统计查询将会出现读数据不一致的状态,此时,应该启用事务支持
547
547
548
- #### 3.3.4 . 事务回滚规则
548
+ #### 3.3.5 . 事务回滚规则
549
549
550
550
这些规则定义了哪些异常会导致事务回滚而哪些不会。默认情况下,事务只有遇到运行期异常(RuntimeException 的子类)时才会回滚,Error 也会导致事务回滚,但是,在遇到检查型(Checked)异常时不会回滚。
551
551
You can’t perform that action at this time.
0 commit comments