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

fix: Avoid re-calculating md5sum on clone and conversion to KmerMinHashBTree #3385

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/core/src/sketch/minhash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@
mins: self.mins.clone(),
abunds: self.abunds.clone(),
current_max: self.current_max,
md5sum: Mutex::new(Some(self.md5sum())),
md5sum: Mutex::new(self.md5sum.lock().unwrap().clone()),
}
}
}
Expand Down Expand Up @@ -1667,6 +1667,8 @@
new_mh.mins = mins;
new_mh.abunds = abunds;

new_mh.md5sum = other.md5sum;

new_mh
}
}
Expand All @@ -1691,6 +1693,8 @@
new_mh.mins = mins;
new_mh.abunds = abunds;

new_mh.md5sum = Mutex::new(other.md5sum.lock().unwrap().clone());

Check warning on line 1696 in src/core/src/sketch/minhash.rs

View check run for this annotation

Codecov / codecov/patch

src/core/src/sketch/minhash.rs#L1696

Added line #L1696 was not covered by tests

new_mh
}
}
Expand All @@ -1714,6 +1718,8 @@
new_mh.mins = mins;
new_mh.abunds = abunds;

new_mh.md5sum = other.md5sum;

new_mh
}
}
Expand Down
Loading