block/manager.rs: Prioritize raw blocks when no compression configured #566

Merged
lx merged 1 commits from jpds/garage:skip-compressed-blocks-scrub-no-compression into main 2023-05-09 09:39:49 +00:00
Contributor

During a node scrub - I noticed that garage was making a large number of syscalls for non-existent .zst files.

This adjusts is_block_compressed() to check if compression is enabled in the node configuration, and if not - it instead checks for the raw blocks first.

During a node scrub - I noticed that garage was making a large number of syscalls for non-existent `.zst` files. This adjusts `is_block_compressed()` to check if compression is enabled in the node configuration, and if not - it instead checks for the raw blocks first.
jpds force-pushed skip-compressed-blocks-scrub-no-compression from 0961b555e3 to c9f56ba97c 2023-05-08 18:37:38 +00:00 Compare
jpds force-pushed skip-compressed-blocks-scrub-no-compression from c9f56ba97c to 94470d5668 2023-05-08 19:28:14 +00:00 Compare
lx closed this pull request 2023-05-09 09:12:56 +00:00
lx reopened this pull request 2023-05-09 09:13:30 +00:00
Owner

Sorry, ignore my previous comment, I didn't understand correctly.

Sorry, ignore my previous comment, I didn't understand correctly.
lx requested changes 2023-05-09 09:15:01 +00:00
@ -604,2 +609,4 @@
}
if fs::metadata(&path).await.is_ok() {
return Ok(true);
Owner

The true/false values returned also need to be swapped in the case we are checking the non-compressed file first.

The true/false values returned also need to be swapped in the case we are checking the non-compressed file first.
jpds marked this conversation as resolved
jpds force-pushed skip-compressed-blocks-scrub-no-compression from 94470d5668 to 9899801472 2023-05-09 09:27:41 +00:00 Compare
jpds force-pushed skip-compressed-blocks-scrub-no-compression from 9899801472 to 9c788059e2 2023-05-09 09:28:32 +00:00 Compare
Owner

LGTM

LGTM
lx merged commit 2f495575d8 into main 2023-05-09 09:39:49 +00:00
Sign in to join this conversation.
No description provided.