gpt4 book ai didi

linux - 不小心从redis中删除了一个表,有没有回滚之类的操作?

转载 作者:可可西里 更新时间:2023-11-01 11:47:22 26 4
gpt4 key购买 nike

在 Redis 上工作一年了,还没有遇到过这个问题。突然去删除表中的某条记录,把整个表都删了。我需要一些帮助。

最佳答案

根据 Redis 文档,它不支持回滚事务,如果您有关系数据库背景,Redis 命令可能会在事务期间失败而不回滚这一事实对您来说可能很奇怪。

However there are good opinions for this behavior:

  • Redis commands can fail only if called with a wrong syntax (and the problem is not detectable during the command queueing), or against keys holding the wrong data type: this means that in practical terms a failing command is the result of a programming errors, and a kind of error that is very likely to be detected during development, and not in production.

  • Redis is internally simplified and faster because it does not need the ability to roll back.

引用Documentation

关于linux - 不小心从redis中删除了一个表,有没有回滚之类的操作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50484627/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com