Pass configured compression param to image generation (#8363)

We need to pass on the configured compression param during image layer
generation.

This was an oversight of #8106, and the likely cause why #8288 didn't
bring any interesting regressions.

Part of https://github.com/neondatabase/neon/issues/5431
This commit is contained in:
Arpad Müller
2024-07-12 01:43:44 +02:00
committed by GitHub
parent 82b9a44ab4
commit 30bbfde50d

View File

@@ -809,7 +809,11 @@ impl ImageLayerWriterInner {
ctx: &RequestContext,
) -> anyhow::Result<()> {
ensure!(self.key_range.contains(&key));
let (_img, res) = self.blob_writer.write_blob(img, ctx).await;
let compression = self.conf.image_compression;
let (_img, res) = self
.blob_writer
.write_blob_maybe_compressed(img, ctx, compression)
.await;
// TODO: re-use the buffer for `img` further upstack
let off = res?;