fix: Remove unused created_at field

pull/24376/head
Carol (Nichols || Goulding) 2022-11-23 10:45:17 -05:00
parent 1ba0f193a9
commit 8618264fe6
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
2 changed files with 2 additions and 6 deletions

View File

@ -97,17 +97,15 @@ impl OpenSegmentFileWriter {
let Self {
id,
path,
f,
bytes_written,
..
} = self;
let metadata = f.metadata().context(UnableToReadFileMetadataSnafu)?;
Ok(ClosedSegment {
id,
path,
size: bytes_written
.try_into()
.expect("bytes_written did not fit in size type"),
created_at: metadata.created().context(UnableToReadCreatedSnafu)?,
})
}
}

View File

@ -16,7 +16,7 @@
use generated_types::influxdata::{iox::delete::v1::DeletePayload, pbdata::v1::DatabaseBatch};
use serde::{Deserialize, Serialize};
use snafu::prelude::*;
use std::{collections::HashMap, io, path::PathBuf, time::SystemTime};
use std::{collections::HashMap, io, path::PathBuf};
use tokio::sync::{mpsc, oneshot, RwLock};
use uuid::Uuid;
@ -229,7 +229,6 @@ impl Wal {
id,
path: child.path(),
size: metadata.len(),
created_at: metadata.created().context(UnableToReadFileMetadataSnafu)?,
};
closed_segments.insert(id, segment);
}
@ -566,7 +565,6 @@ pub struct ClosedSegment {
id: SegmentId,
path: PathBuf,
size: u64,
created_at: SystemTime,
}
impl ClosedSegment {