mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
fix(rdb_load): Handle JSON loading failure when parsing fails (#4801)
* fix(rdb_load): Handle JSON loading failure when parsing fails Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io> * refactor(compact_obj): Clean up code Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io> * refactor: address comments Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io> --------- Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
This commit is contained in:
parent
dba7f08265
commit
f4f615ff34
2 changed files with 5 additions and 6 deletions
|
@ -56,10 +56,6 @@ size_t QlMAllocSize(quicklist* ql, bool slow) {
|
|||
}
|
||||
|
||||
size_t UpdateSize(size_t size, int64_t update) {
|
||||
if (update >= 0) {
|
||||
return size + update;
|
||||
}
|
||||
|
||||
int64_t result = static_cast<int64_t>(size) + update;
|
||||
if (result < 0) {
|
||||
DCHECK(false) << "Can't decrease " << size << " from " << -update;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue