New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP feat(tiering): Defragmentation #3021
base: main
Are you sure you want to change the base?
Conversation
src/server/tiered_storage.cc
Outdated
void Defragment(tiering::DiskSegment segment, string_view value) { | ||
auto hashes = ts_->bins_->DeleteBin(segment, value); | ||
for (auto [dbid, hash] : hashes) { | ||
auto it = db_slice_->GetDBTable(dbid)->prime.Find(hash); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
who implemented find by hash value in dash table?
I can see this code in main branch..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nobody 🙂 It doesn't compile with what I pushed. Generally, we can't find a value just by hash, but we can loop over all values with the same hash and try finding a value that is external and lies on the given segment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes that is what yue did in a PR, you will also need to check that the external value offset is the same offset of the hash in the segment this way you can be sure its the same key
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
No description provided.