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(nexus): fixing missing I/Os during nexus rebuild #1583

Merged
merged 2 commits into from
Feb 10, 2024
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions io-engine-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ bytes = "1.5.0"
chrono = "0.4.31"
colored_json = "4.0.0"
crossbeam = "0.8.2"
derive_builder = "0.12.0"
etcd-client = "0.12.1"
function_name = "0.3.0"
futures = "0.3.28"
Expand Down
10 changes: 9 additions & 1 deletion io-engine-tests/src/file_io.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use once_cell::sync::OnceCell;
use rand::{distributions::Uniform, Rng, SeedableRng};
use rand_chacha::ChaCha8Rng;
use serde::Serialize;
use std::{
fmt::{Display, Formatter},
io::SeekFrom,
Expand All @@ -26,7 +27,8 @@ fn create_test_buf(buf_size: DataSize) -> Vec<u8> {
}

/// TODO
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize)]
#[serde(into = "u64")]
pub struct DataSize(u64);

impl Display for DataSize {
Expand All @@ -47,6 +49,12 @@ impl From<DataSize> for usize {
}
}

impl From<u64> for DataSize {
fn from(value: u64) -> Self {
Self::from_bytes(value)
}
}

impl Default for DataSize {
fn default() -> Self {
Self::from_bytes(0)
Expand Down
Loading
Loading