Support gzip compression for EtcdSnapshot
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- aws, go, kubernetes
- Bereich
- backend, infrastructure
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Go
- Sterne
- 154
- Forks
- 31
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cozystack/etcd-operator
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
cozystack/etcd-operator#385 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
cozystack/etcd-operator#383 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 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 resultEvtl. vergeben @androndo hat das vor 46 Tagen übernommen. Offenbug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
cozystack/etcd-operator#373 ·
-
bugfix controllers
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
cozystack/etcd-operator#372 ·
Alle Issues in cozystack/etcd-operator
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Correct local module testing instructions for Go sample contributorsEvtl. vergeben @slievrly hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Evtl. vergeben @pacwestnobody hat das heute übernommen. Offengo good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Podiom/Podiom#427 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -raceEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
factory:subtask
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
Maintainer antworten meist innerhalb von 1 Tag