Skip to content

Commit

Permalink
Remove the temporary checksum feature (#378)
Browse files Browse the repository at this point in the history
Signed-off-by: Monthon Klongklaew <monthonk@amazon.com>
  • Loading branch information
monthonk authored Jul 14, 2023
1 parent 146b9d3 commit d335a48
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
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

0 comments on commit d335a48

Please sign in to comment.