fix: buffer size typo (#25039)

pull/25046/head^2
Draco 2024-06-08 00:48:04 +08:00 committed by GitHub
parent a5eba2f8f2
commit 84b38f5a06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -261,7 +261,7 @@ impl WalSegmentWriterImpl {
f, f,
bytes_written, bytes_written,
sequence_number: SequenceNumber::new(0), sequence_number: SequenceNumber::new(0),
buffer: Vec::with_capacity(8 * 1204), // 8kiB initial size buffer: Vec::with_capacity(8 * 1024), // 8kiB initial size
}) })
} }
pub fn open(root: PathBuf, segment_id: SegmentId) -> Result<Self> { pub fn open(root: PathBuf, segment_id: SegmentId) -> Result<Self> {
@ -280,7 +280,7 @@ impl WalSegmentWriterImpl {
.try_into() .try_into()
.expect("file length must fit in usize"), .expect("file length must fit in usize"),
sequence_number: file_info.last_sequence_number, sequence_number: file_info.last_sequence_number,
buffer: Vec::with_capacity(8 * 1204), // 8kiB initial size buffer: Vec::with_capacity(8 * 1024), // 8kiB initial size
}) })
} else { } else {
Err(Error::FileDoesntExist(path.to_path_buf())) Err(Error::FileDoesntExist(path.to_path_buf()))