
事务
平静不绝望
ALOHA HEJA HE
-
原创 【Mysql】quick review 分布式事务 存储 redo undo all-in-one
1 存储引擎存储引擎主要有: 1. MyIsam , 2. InnoDB, 3. Memory, 4. Archive, 5. Federated1.1 InnoDB(B+树):InnoDB 底层存储结构为B+树, B树的每个节点对应innodb的一个page,page大小是固定的, 一般设为 16k。其中非叶子节点只有键值,叶子节点包含完成数据。适用场景: 经常更新的表,适合处理多重并发的更新请求。 支持事务。 可以从灾难中恢复(通过 bin-log 日志等) 外键约束。只有他支持外键2021-02-19 18:40:1048
1
-
原创 【ACID】C不属于ACID,一致性不属于ACID,为什么?
1 C 的含义The word consistency is terribly overloaded:重载含义四个• Replica consistency and the issue of eventual consistency that arises in asynchronously replicated systems . • Consistent hashing is an approach to partitioning that some systems use for rebal2021-01-21 09:12:1056
1
-
原创 【DRDS分布式事务】分布式事务
1 分布式事务2 使用// 1import org.springframework.jdbc.datasource.DataSourceTransactionManager;import org.springframework.transaction.TransactionDefinition;import javax.sql.DataSource;import java.sql.Connection;import java.sql.SQLException;import java.2020-05-24 15:51:41219
0
-
翻译 知识库--Creating Nested Transactions By Akka 内存嵌套事务(129)
public class Account { final private Ref<Integer> balance = new Ref<Integer>(); public Account(int initialBalance) { balance.swap(initialBalance);//自带事务 } public int getBalanc2017-03-02 08:28:33359
0
-
翻译 知识库--Akka 事务配置-using jvm(134)
Akka assumes a number of default settings, but it allows us to change these either programmatically or through the configuration file akka.conf.使用编程方式配置事务 We can programmatically change the settings o2017-03-07 08:46:50247
0
-
翻译 知识库--Limitations of STM 【高并发写 not in favor】(137)
STM的优点 STM eliminates explicit synchronization. We no longer have to worry if we forgot to synchronize or if we synchronized at the wrong level. There are no issues of failing to cross the memory barr2017-03-10 08:32:58371
0
-
原创 【数据库事务】--事务传播子方法事务失效(老张)
1 AOP的配置xml expose-proxy="true"暴露代理对象2 子类中获取代理,使事务生效(方法一)org.springframework.aop.framework.AopContext#currentProxy 调用方法method3 方法二:使用ApplicationContext获取对应的代理类调用方法method2017-11-05 18:34:26373
0
-
原创 【数据库事务】--事务死锁与检测
单机事务1 死锁产生原因 A 两个线程 B 不同方向 C 相同资源2 解决方案 A 尽可能不死锁 B 碰撞检测 (获取锁,去看另一个事务持有的锁) (主流数据库)C 等锁超时2017-11-05 20:18:53216
0
-
原创 redis pipeline 事务到底怎么回事呢? 怎么执行的?
MULTI,EXEC,DISCARDandWATCHare the foundation of transactions in Redis.They allow the execution of a group of commands in a single step, with two important guarantees: All the commands in a tr...2019-04-25 11:47:27559
0