Conversation
| }; | ||
|
|
||
| for (size_t i = 0; i < 10'000; i++) | ||
| ss_->Add(build_str(i)); |
There was a problem hiding this comment.
Would maybe worth to add a unit with ttl to be 100% sure we copy it properly. So two tests in total:
- As is now, without ttl
- With ttl
| } | ||
|
|
||
| // Does not release obj. Callers must deallocate with sdsfree explicitly | ||
| pair<sds, bool> StringSet::DuplicateEntryIfFragmented(void* obj, float ratio) { |
There was a problem hiding this comment.
Once I am back from the holidays I will see how to refactor those under one single function for all DenseSet variants. Furthermore, same applies for the tests
|
It can wait for your return, I prefer not to merge it now |
chakaz
left a comment
There was a problem hiding this comment.
Generally LG, but I'd love @romange to at least take a look at the ReallocIfNeeded part. Specifically is it always safe and true to do:
auto* ptr = curr_entry_;
if (ptr->IsLink()) {
ptr = ptr->AsLink();
}
DCHECK(!ptr->IsEmpty());
DCHECK(ptr->IsObject());?
Yep this is fine, In fact, we can unify some of those functions under the same interface -- something I wanted to do but I do not currently have the bandwidth for the small refactor |
Resolves #3822