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:
Stepan Bagritsevich 2025-03-28 14:30:10 +01:00 committed by GitHub
parent dba7f08265
commit f4f615ff34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View file

@ -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;