From da0e154ae644d62d5d3875345d75a6de384aff71 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Tue, 20 Mar 2018 14:29:54 -0700 Subject: [PATCH] CHANGELOG: add auto-compaction changes Signed-off-by: Gyuho Lee --- CHANGELOG-3.1.md | 7 +++++++ CHANGELOG-3.2.md | 9 +++++++++ CHANGELOG-3.3.md | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/CHANGELOG-3.1.md b/CHANGELOG-3.1.md index 31b3d59dc..2f18aa9a9 100644 --- a/CHANGELOG-3.1.md +++ b/CHANGELOG-3.1.md @@ -236,6 +236,13 @@ See [security doc](https://github.com/coreos/etcd/blob/master/Documentation/op-g - Cluster rejects removing members if quorum will be lost. - Discovery now has upper limit for waiting on retries. - Warn on binding listeners through domain names; to be deprecated. +- v3.0 and v3.1 with `--auto-compaction-retention=10` run periodic compaction on v3 key-value store for every 10-hour. + - Compactor only supports periodic compaction. + - Compactor records latest revisions every 5-minute, until it reaches the first compaction period (e.g. 10-hour). + - In order to retain key-value history of last compaction period, it uses the last revision that was fetched before compaction period, from the revision records that were collected every 5-minute. + - When `--auto-compaction-retention=10`, compactor uses revision 100 for compact revision where revision 100 is the latest revision fetched from 10 hours ago. + - If compaction succeeds or requested revision has already been compacted, it resets period timer and starts over with new historical revision records (e.g. restart revision collect and compact for the next 10-hour period). + - If compaction fails, it retries in 5 minutes. ### Go diff --git a/CHANGELOG-3.2.md b/CHANGELOG-3.2.md index 96cfc3e11..349b66e08 100644 --- a/CHANGELOG-3.2.md +++ b/CHANGELOG-3.2.md @@ -428,6 +428,15 @@ See [security doc](https://github.com/coreos/etcd/blob/master/Documentation/op-g - Add `--enable-v2` flag to enable v2 API server. - `--enable-v2=true` by default. - Add `--auth-token` flag. +- v3.2 compactor runs [every hour](https://github.com/coreos/etcd/pull/7875). + - Compactor only supports periodic compaction. + - Compactor continues to record latest revisions every 5-minute. + - For every hour, it uses the last revision that was fetched before compaction period, from the revision records that were collected every 5-minute. + - That is, for every hour, compactor discards historical data created before compaction period. + - The retention window of compaction period moves to next hour. + - For instance, when hourly writes are about 100 and `--auto-compaction-retention=10`, v3.1 compacts revision 1000, 2000, and 3000 for every 10-hour, while v3.2 compacts revision 1000, 1100, and 1200 for every 1-hour. + - If compaction succeeds or requested revision has already been compacted, it resets period timer and removes used compacted revision from historical revision records (e.g. start next revision collect and compaction from previously collected revisions). + - If compaction fails, it retries in 5 minutes. ### Added: `clientv3` diff --git a/CHANGELOG-3.3.md b/CHANGELOG-3.3.md index 628a87233..6e8db0ffd 100644 --- a/CHANGELOG-3.3.md +++ b/CHANGELOG-3.3.md @@ -181,6 +181,11 @@ See [security doc](https://github.com/coreos/etcd/blob/master/Documentation/op-g - Change `--auto-compaction-retention` flag to [accept string values](https://github.com/coreos/etcd/pull/8563) with [finer granularity](https://github.com/coreos/etcd/issues/8503). - e.g. `--auto-compaction-mode=periodic --auto-compaction-retention=30m` automatically `Compact` on latest revision every 30-minute. - e.g. `--auto-compaction-mode=revision --auto-compaction-retention=1000` automatically `Compact` on `"latest revision" - 1000` every 5-minute (when latest revision is 30000, compact on revision 29000). + - Periodic compactor continues to record latest revisions for every 1/10 of given compaction period (e.g. 1-hour when `--auto-compaction-mode=periodic --auto-compaction-retention=10h`). + - For every 1/10 of given compaction period, compactor uses the last revision that was fetched before compaction period, to discard historical data. + - The retention window of compaction period moves for every 1/10 of given compaction period. + - For instance, when hourly writes are about 100 and `--auto-compaction-retention=10`, v3.1 compacts revision 1000, 2000, and 3000 for every 10-hour, while v3.2 and v3.3 compacts revision 1000, 1100, and 1200 for every 1-hour. Futhermore, when writes per minute are about 1000, v3.3 with `--auto-compaction-mode=periodic --auto-compaction-retention=30m` can compact revision 30000, 33000, and 36000, for every 3-minute with more finer granularity. + - Whether compaction succeeds or not, this process repeats for every 1/10 of given compaction period. If compaction succeeds, it just removes compacted revision from historical revision records. - Add [`--grpc-keepalive-min-time`, `--grpc-keepalive-interval`, `--grpc-keepalive-timeout`](https://github.com/coreos/etcd/pull/8535) flags to configure server-side keepalive policies. - Serve [`/health` endpoint as unhealthy](https://github.com/coreos/etcd/pull/8272) when [alarm (e.g. `NOSPACE`) is raised or there's no leader](https://github.com/coreos/etcd/issues/8207). - Define [`etcdhttp.Health`](https://godoc.org/github.com/coreos/etcd/etcdserver/api/etcdhttp#Health) struct with JSON encoder.