Support gzip compression for EtcdSnapshot
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- aws, go, kubernetes
- Domaine
- backend, infrastructure
Piste de recherche
Start from the agent's snapshot path, where cli.Snapshot() streams to the file or S3 uploader, and from the objectKey/localPath naming, then trace how the Job receives its settings. The restore path needs ensureRestoreSpace to account for uncompressed size and a .gz check before calling etcdutl. Done means a gzip-enabled snapshot round-trips through restore, and status.artifact reports the compressed size and SHA-256. Settle the --skip-hash-check question with maintainers before changing it.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Our etcd database size is already several GB, so it would be nice if EtcdSnapshot can support gzip compression. Every snapshot is uploaded to S3 (and downloaded again when restore), which costs a lot of traffic, and with frequent snapshots and some retention, the .db files also take a lot of space in the bucket.
etcd snapshots compress well. In my test, gzip saves about 85% space, both before and after defrag.
spec:
compression: gzip # default: none
I took a quick look at the code. For snapshot, the agent already streams cli.Snapshot() to the file/S3 uploader, so I think we only need to wrap it with a gzip.Writer, change the file name to <name>.db.gz (objectKey / localPath), and pass the setting to the Job.
For restore, the source is already an exact key/path, so no new field is needed. The agent can decompress it when the name ends with .gz, then call etcdutl. ensureRestoreSpace also needs to consider the uncompressed size.
I think status.artifact size/SHA-256 should be for the compressed file, since that is what is actually stored. gzip also has a CRC, so a broken file will fail when decompressing.
by the way,
restore uses --skip-hash-check because the snapshot stream "carries no hash", but actually the server appends a SHA-256 at the end and clientv3 keeps it, so this flag can be removed.
(or do I need to open a new issue for that?)
I'm happy to send a PR if this looks OK.
- Langage dominant
- Go
- Étoiles
- 154
- Forks
- 31
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de cozystack/etcd-operator
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
cozystack/etcd-operator#385 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
cozystack/etcd-operator#383 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
cozystack/etcd-operator#381 ·
-
Adoption deletes the legacy cluster-state ConfigMap but leaves Pods referencing it, and neither self-heal path detects the resultPeut-être pris @androndo l’a pris il y a 46 jours. Ouvertebug
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
cozystack/etcd-operator#373 ·
-
bugfix controllers
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
cozystack/etcd-operator#372 ·
Toutes les issues de cozystack/etcd-operator
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Correct local module testing instructions for Go sample contributorsPeut-être pris @slievrly l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Peut-être pris @pacwestnobody l’a pris aujourd’hui. Ouvertego good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Podiom/Podiom#427 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -racePeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
factory:subtask
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
Les mainteneurs répondent en général sous 1 jour