watchpoints / weekly

Apache License 2.0
5 stars 2 forks source link

第33题:mysql三大日志-binlog、redo log和undo 区别 #28

Open watchpoints opened 2 years ago

watchpoints commented 2 years ago

https://jobs.toutiao.com/h5/pdi/recruit/storage?ref=fuyongxing&code=EPDMFRJ

watchpoints commented 2 years ago

数据库事务四大特性中有一个是 原子性 ,具体来说就是 原子性是指对数据库的一系列操作,要么全部成功,要么全部失败,不可能出现部分成功的情况 。实际上, 原子性 底层就是通过 undo log 实现的。 undo log 主要记录了数据的逻辑变化,比如一条 ` INSERT

watchpoints commented 2 years ago

https://www.bookstack.cn/read/aliyun-rds-core/69ea6723e648962e.md

watchpoints commented 2 years ago

MySQL 保证数据不会丢的能力主要体现在两方面:

能够恢复到任何时间点的状态;

能够保证MySQL在任何时间段突然奔溃,重启后之前提交的记录都不会丢失; 【不明白】

watchpoints commented 2 years ago

redis的sl层级比二叉平衡树要低很多,源码中SKIPLIST_P用的是0.25,层次数期望值相当于四叉平衡树