当前位置:网站首页>redis事务
redis事务
2022-08-05 05:12:00 【价值成长】
事务: 一组命令的集合。一个事务中所有命令都会序列化,按顺序地串行化执行而不会被其他命令插入,不许加塞。
作用: 一个队列中,一次性,顺序性,排他性的执行一系列命令。
0. 常用命令 EXEC 执行事务; MULTI 开启事务
1. 放弃事务 DISCARD
2. 全体连坐 一次性全部成功或失败,单次执行过程就报错了,比较严重的错误
3. 冤头寨主 谁错找谁,单次执行没报错,已经加入队列,最终执行事务报错,一般错误
4. watch监控 WATCH UNWATCH 类似乐观锁 CAS: Check and Set
UNWATCH 之前所有的锁失效。
事务三阶段:
开启:以MULTI开启一个事务
入队:将多个命令入队到事务中,接到这些命令不会立即执行,而是放到等待执行事务的队列中
执行:由EXEC命令触发事务
redis事务的特点: 单独的隔离操作,没有隔离级别,不保证原子性
边栏推荐
- Shell(4) Conditional Control Statement
- After controlling the export file in MySQL, it becomes \N. Is there any solution?
- 【Transfer】What is etcd
- 基于Web的商城后台管理系统的设计与实现
- u-boot调试定位手段
- 【cesium】Load and locate 3D Tileset
- LAB 信号量实现细节
- Error creating bean with name ‘configDataContextRefresher‘ defined in class path resource
- 【学习笔记之菜Dog学C】动态内存管理之经典笔试题
- Using QR codes to solve fixed asset management challenges
猜你喜欢

Algorithms - ones and zeros (Kotlin)

【cesium】加载并定位 3D Tileset

Flex layout frog game clearance strategy

OFDM 十六讲 5 -Discrete Convolution, ISI and ICI on DMT/OFDM Systems

Dephi reverse tool Dede exports function name MAP and imports it into IDA

The role of DataContext in WPF

Difference between for..in and for..of

8.04 Day35-----MVC三层架构

Flutter real machine running and simulator running

Using QR codes to solve fixed asset management challenges
随机推荐
Using QR codes to solve fixed asset management challenges
number_gets the specified number of decimals
How to quickly upgrade your Taobao account to a higher level
2022杭电多校第一场01
雷克萨斯lm的安全性到底体现在哪里?一起来看看吧
Mysql5.7 二进制 部署
Structured Light 3D Reconstruction (2) Line Structured Light 3D Reconstruction
开发一套高容错分布式系统
Flutter学习2-dart学习
Qt produces 18 frames of Cupid to express his love, is it your Cupid!!!
仪表板展示 | DataEase看中国:数据呈现中国资本市场
1068 Find More Coins
社区分享|腾讯海外游戏基于JumpServer构建游戏安全运营能力
【cesium】元素高亮显示
A blog clears the Redis technology stack
逆向理论知识4
【cesium】Load and locate 3D Tileset
入口点注入
Flutter real machine running and simulator running
[Decoding tools] Some online tools for Bitcoin