mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 09:52:54 +00:00
REVIEW: minor nits
This commit is contained in:
@@ -235,7 +235,7 @@ impl BlobWriter {
|
||||
ctx: &RequestContext,
|
||||
algorithm: ImageCompressionAlgorithm,
|
||||
) -> (FullSlice<Buf>, Result<(u64, CompressionInfo), Error>) {
|
||||
let offset = self.size();
|
||||
let offset = self.offset;
|
||||
let mut compression_info = CompressionInfo {
|
||||
written_compressed: false,
|
||||
compressed_size: None,
|
||||
|
||||
@@ -245,7 +245,7 @@ async fn download_object(
|
||||
};
|
||||
buffered.write_buffered_borrowed(&chunk, ctx).await?;
|
||||
}
|
||||
let inner = buffered.shutdown(|_| None).await?;
|
||||
let inner = buffered.shutdown(|_| None).await?; // TODO: if we leave handle_tail=None here, it means we'll cut off layers that aren't a tail sz multiple
|
||||
Ok(inner)
|
||||
}
|
||||
.await?;
|
||||
|
||||
@@ -772,7 +772,7 @@ impl Drop for DeltaLayerWriter {
|
||||
{
|
||||
Ok(vfile) => vfile,
|
||||
Err(e) => {
|
||||
error!(err=%e, "failed to remove image layer writer file");
|
||||
error!(err=%e, "failed to remove delta layer writer file");
|
||||
drop(_gate_guard);
|
||||
return;
|
||||
}
|
||||
@@ -781,7 +781,7 @@ impl Drop for DeltaLayerWriter {
|
||||
if let Err(e) = std::fs::remove_file(vfile.path())
|
||||
.maybe_fatal_err("failed to remove the virtual file")
|
||||
{
|
||||
error!(err=%e, path=%vfile.path(), "failed to remove image layer writer file");
|
||||
error!(err=%e, path=%vfile.path(), "failed to remove delta layer writer file");
|
||||
}
|
||||
drop(_gate_guard);
|
||||
});
|
||||
|
||||
@@ -186,7 +186,7 @@ where
|
||||
Ok((recycled, flush_control))
|
||||
}
|
||||
|
||||
pub(super) async fn handle_error<T>(&mut self) -> std::io::Result<T> {
|
||||
async fn handle_error<T>(&mut self) -> std::io::Result<T> {
|
||||
Err(self
|
||||
.shutdown()
|
||||
.await
|
||||
@@ -196,7 +196,7 @@ where
|
||||
|
||||
/// Cleans up the channel, join the flush task.
|
||||
pub async fn shutdown(&mut self) -> std::io::Result<RequestContext> {
|
||||
let handle = self
|
||||
let handle: FlushHandleInner<Buf, W> = self
|
||||
.inner
|
||||
.take()
|
||||
.expect("must not use after we returned an error");
|
||||
|
||||
Reference in New Issue
Block a user