Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dranikpg
Copy link
Contributor

@dranikpg dranikpg commented May 7, 2024

No description provided.

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);
Copy link
Collaborator

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..

Copy link
Contributor Author

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

Copy link
Collaborator

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants