Support gzip compression for EtcdSnapshot
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- aws, go, kubernetes
- Área
- backend, infrastructure
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 154
- Forks
- 31
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cozystack/etcd-operator
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
cozystack/etcd-operator#385 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
cozystack/etcd-operator#383 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 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 resultPosiblemente ocupada @androndo la tomó hace 46 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
cozystack/etcd-operator#373 ·
-
bugfix controllers
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
cozystack/etcd-operator#372 ·
Todos los issues de cozystack/etcd-operator
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Correct local module testing instructions for Go sample contributorsPosiblemente ocupada @slievrly la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Posiblemente ocupada @pacwestnobody la tomó hoy. Abiertogo good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Podiom/Podiom#427 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -racePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
factory:subtask
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
Los mantenedores suelen responder en 1 día