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

Remove the temporary checksum feature #378

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions mountpoint-s3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ fuse_tests = []
s3_tests = []
shuttle = []
delete = []
# A temporary feature flag to enable read-path checksums while we are working to improve its performance
checksum = []

[build-dependencies]
built = { version = "0.6.0", features = ["git2"] }
Expand Down
5 changes: 0 additions & 5 deletions mountpoint-s3/src/prefetch/checksummed_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ impl ChecksummedBytes {
///
/// Return `IntegrityError` on data corruption.
pub fn into_bytes(self) -> Result<Bytes, IntegrityError> {
#[cfg(feature = "checksum")]
self.validate()?;

Ok(self.curr_slice)
Expand Down Expand Up @@ -72,7 +71,6 @@ impl ChecksummedBytes {
let new_checksummed_bytes = ChecksummedBytes::new(new_bytes, new_checksum);

// Validate data integrity with checksum bracketing.
#[cfg(feature = "checksum")]
{
// 1. repeat the operation, which means copying into a new buffer in this case.
let mut bytes_mut_dup = BytesMut::with_capacity(total_len);
Expand Down Expand Up @@ -145,7 +143,6 @@ mod tests {
assert_eq!(expected, actual);
}

#[cfg(feature = "checksum")]
#[test]
fn test_into_bytes_integrity_error() {
let bytes = Bytes::from_static(b"some bytes");
Expand Down Expand Up @@ -210,7 +207,6 @@ mod tests {
assert_eq!(expected, actual);
}

#[cfg(feature = "checksum")]
#[test]
fn test_extend_self_corrupted() {
let bytes = Bytes::from_static(b"some bytes");
Expand All @@ -228,7 +224,6 @@ mod tests {
assert!(matches!(result, Err(IntegrityError::ChecksumMismatch(_, _))));
}

#[cfg(feature = "checksum")]
#[test]
fn test_extend_other_corrupted() {
let bytes = Bytes::from_static(b"some bytes");
Expand Down