Repository navigation
feat(export-to-core): use pigz for parallel archive compression - #36
Merged
Merged
Conversation
Add multi-threaded pigz (.tar.gz) archive compression for both mysql-data (mysqldump and mydumper modes) and fs-data, with automatic OS package installation (AUTO_INSTALL_PIGZ), configurable thread limits (USE_PIGZ, PIGZ_THREADS), clean fallback to single-threaded gzip, updated README instructions, and unit/integration tests.
There was a problem hiding this comment.
Code Review
This pull request introduces parallel archive compression using pigz for packaging database and filesystem archives, falling back to single-threaded gzip when unavailable. It also adds automatic installation of pigz via system package managers and corresponding configuration options. The review feedback suggests wrapping proc.kill() calls in try...except OSError blocks to prevent potential crashes during process cleanup, and prepending env DEBIAN_FRONTEND=noninteractive to apt-get commands to ensure they run non-interactively when executed via sudo.
… in metadata.json
…tier upgrade semantics
…and exportMetrics in metadata.json
shubhamitabh
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the single-threaded
tar -czf -(gzip) bottleneck during Looker Core export archive packaging with multi-threadedpigzparallel compression across bothmysql-data(mysqldumpandmydumpermodes) andfs-data, while maintaining 100% RFC 1952.tar.gzcompatibility with Looker (Google Cloud core) import jobs.Key Changes
.tar.gzPackaging (looker_export.py):tar -cf -intopigz -c(with optional-p <PIGZ_THREADS>) before Tink Streaming AEAD (AES128_CTR_HMAC_SHA256_1MB) encryption for bothencrypt_database_dump()andpackage_filesystem().tarandpigzchild processes for signal cleanup, closes the parent's pipe read/write copy soSIGPIPEpropagates cleanly, and verifies both exit codes (tar_rc == 0andpigz_rc == 0) so upstream archive errors are never masked.pigzInstallation & Fallback (looker_export.py):USE_PIGZ(autodefault,true, orfalse),PIGZ_THREADS(optional integer>= 1; defaults to all online vCPUs), andAUTO_INSTALL_PIGZ(truedefault).pigzis missing onPATHandAUTO_INSTALL_PIGZ=true, attempts non-blocking package installation viaapt-get,dnf,yum,zypper,apk, orbrew(probingsudo -n truein automated runs so non-root hosts without passwordlesssudonever hang), falling back cleanly to single-threadedgzipwhenUSE_PIGZ=auto.export-to-core/README.md):apt-get/dnfcommands), Usage, and the Configuration Variables Reference table (USE_PIGZ,PIGZ_THREADS,AUTO_INSTALL_PIGZ).export-to-core/tests/test_export_to_core.py):USE_PIGZ/PIGZ_THREADS/AUTO_INSTALL_PIGZvalidation, automaticapt-getinstallation & non-passwordless-sudo fallback, and non-zerotarexit-code propagation through thetar | pigzpipeline.pigz(USE_PIGZ=true,PIGZ_THREADS=2) andUSE_PIGZ=falseoverride, verifying valid.tar.gzarchives for bothmysql-dataandfs-data.Verification