feat: implement fieldttl for the hash family (#2040)

Fix some corner case bug with set family as well.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2023-10-20 21:51:24 +03:00 committed by GitHub
parent 4a2dd30886
commit 215c037e41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 86 additions and 35 deletions

View file

@ -413,6 +413,8 @@ void DenseSet::AddUnique(void* obj, bool has_ttl, uint64_t hashcode) {
auto DenseSet::Find2(const void* ptr, uint32_t bid, uint32_t cookie)
-> tuple<size_t, DensePtr*, DensePtr*> {
DCHECK_LT(bid, entries_.size());
DensePtr* curr = &entries_[bid];
ExpireIfNeeded(nullptr, curr);