mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
fix: do not check-fail in OpRestore (#4332)
fix: do not check-fail OpRestore In some rare cases we reach inconsistent state inside OpRestore where a key already exists, though it should not. In that case log the error instead of crashing the server. In addition, we update the existing entry to the latest restored value. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
bf410b6e0b
commit
c22c9448b5
2 changed files with 52 additions and 33 deletions
|
@ -281,6 +281,10 @@ class DbSlice {
|
|||
Iterator it;
|
||||
ExpIterator exp_it;
|
||||
AutoUpdater post_updater;
|
||||
|
||||
bool IsValid() const {
|
||||
return !it.is_done();
|
||||
}
|
||||
};
|
||||
|
||||
ItAndUpdater FindMutable(const Context& cntx, std::string_view key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue