mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
fix: skip empty objects on load and replication (#3514)
* skip empty objects in rdb save * skip empty objects in rdb load * delete empty keys in FindReadOnly --------- Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
parent
84a697dd75
commit
b979994025
11 changed files with 185 additions and 12 deletions
|
@ -292,9 +292,9 @@ class DbSlice {
|
|||
ExpConstIterator exp_it;
|
||||
};
|
||||
|
||||
ItAndExpConst FindReadOnly(const Context& cntx, std::string_view key) const;
|
||||
ItAndExpConst FindReadOnly(const Context& cntx, std::string_view key);
|
||||
OpResult<ConstIterator> FindReadOnly(const Context& cntx, std::string_view key,
|
||||
unsigned req_obj_type) const;
|
||||
unsigned req_obj_type);
|
||||
|
||||
struct AddOrFindResult {
|
||||
Iterator it;
|
||||
|
@ -515,6 +515,8 @@ class DbSlice {
|
|||
void PreUpdate(DbIndex db_ind, Iterator it, std::string_view key);
|
||||
void PostUpdate(DbIndex db_ind, Iterator it, std::string_view key, size_t orig_size);
|
||||
|
||||
bool DelEmptyPrimeValue(const Context& cntx, Iterator it);
|
||||
|
||||
OpResult<AddOrFindResult> AddOrUpdateInternal(const Context& cntx, std::string_view key,
|
||||
PrimeValue obj, uint64_t expire_at_ms,
|
||||
bool force_update);
|
||||
|
@ -555,7 +557,7 @@ class DbSlice {
|
|||
|
||||
OpResult<PrimeItAndExp> FindInternal(const Context& cntx, std::string_view key,
|
||||
std::optional<unsigned> req_obj_type,
|
||||
UpdateStatsMode stats_mode) const;
|
||||
UpdateStatsMode stats_mode);
|
||||
OpResult<ItAndUpdater> FindMutableInternal(const Context& cntx, std::string_view key,
|
||||
std::optional<unsigned> req_obj_type);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue