Open chakaz opened 6 months ago
Eviction and Expiring items on background process
@adiholden and I discussed this a few days ago. There is no correctness issue (we can think of?) when not calling PreUpdate()
(and specifically the callbacks) before deleting an item.
Usually before updating some value we want replication to send the original bucket, as the update can be incremental. But not sending the bucket before deletion would just mean that the replica will get the bucket without the deleted key. No harm done, unless the bucket is somehow changed by that, which shouldn't(?) be the case.
Anyway, it does sound like a good idea to call PreUpdate()
for consistency and possibly some edge cases we couldn't think of.
_Originally posted by @adiholden in https://github.com/dragonflydb/dragonfly/pull/2308#discussion_r1431295495_