Revision 911204cd7624a4e9f94e0552c11c8cbb8c3771ca authored by Piotr Tabor on 28 April 2021, 20:46:42 UTC, committed by Piotr Tabor on 29 April 2021, 09:51:24 UTC
Prior to this CL, `ETCDCTL_API=2 etcdctl backup --with-v3` was readacting WAL log
(by removal of some entries), but was NOT updating consistent_index in the backend.
Also the WAL editing logic was buggy, as it didn't took in consideration the fact
that when TERM changes, there can be entries with duplicated indexes in
the log. So its NOT sufficient to subtract number of removed entries to
get accurate log indexes.

The PR replaces removing and shifting of WAL entries with replacing them with an no-op entries.
Thanks to this consistent-index references are staying up to date.

The PR also:
  - updates 'verification' logic to check whether consistent_index does not lag befor last snapshot
  - env-gated execution of verification framework in `etcdctl backup`.

Tested with:
```
(./build.sh && cd tests && EXPECT_DEBUG=TRUE 'env' 'go' 'test' '-timeout=300m' 'go.etcd.io/etcd/tests/v3/e2e' -run=TestCtlV2Backup --count=1000 2>&1 | tee TestCtlV2BackupV3.log)
```
1 parent adc365e
History
File Mode Size
.github
Documentation
api
client
contrib
etcdctl
hack
logos
pkg
raft
scripts
security
server
tests
tools
.gitignore -rw-r--r-- 290 bytes
.header -rw-r--r-- 593 bytes
.travis.yml -rw-r--r-- 4.6 KB
.words -rw-r--r-- 1.3 KB
ADOPTERS.md -rw-r--r-- 9.7 KB
CHANGELOG-2.3.md -rw-r--r-- 260 bytes
CHANGELOG-3.0.md -rw-r--r-- 10.2 KB
CHANGELOG-3.1.md -rw-r--r-- 27.5 KB
CHANGELOG-3.2.md -rw-r--r-- 51.8 KB
CHANGELOG-3.3.md -rw-r--r-- 75.0 KB
CHANGELOG-3.4.md -rw-r--r-- 89.9 KB
CHANGELOG-3.5.md -rw-r--r-- 23.1 KB
CHANGELOG-4.0.md -rw-r--r-- 2.5 KB
CONTRIBUTING.md -rw-r--r-- 3.3 KB
DCO -rw-r--r-- 1.4 KB
Dockerfile-release.amd64 -rw-r--r-- 642 bytes
Dockerfile-release.arm64 -rw-r--r-- 241 bytes
Dockerfile-release.ppc64le -rw-r--r-- 243 bytes
Dockerfile-release.s390x -rw-r--r-- 241 bytes
GOVERNANCE.md -rw-r--r-- 3.7 KB
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS -rw-r--r-- 1.0 KB
Makefile -rw-r--r-- 17.9 KB
Procfile -rw-r--r-- 1.6 KB
Procfile.learner -rw-r--r-- 900 bytes
Procfile.v2 -rw-r--r-- 1.6 KB
README.md -rw-r--r-- 8.8 KB
ROADMAP.md -rw-r--r-- 900 bytes
bill-of-materials.json -rw-r--r-- 10.5 KB
bill-of-materials.override.json -rw-r--r-- 254 bytes
build -rwxr-xr-x 117 bytes
build.bat -rwxr-xr-x 51 bytes
build.ps1 -rw-r--r-- 2.7 KB
build.sh -rwxr-xr-x 3.5 KB
code-of-conduct.md -rw-r--r-- 143 bytes
codecov.yml -rw-r--r-- 482 bytes
dummy.go -rw-r--r-- 929 bytes
etcd.conf.yml.sample -rw-r--r-- 3.5 KB
go.mod -rw-r--r-- 1.1 KB
go.sum -rw-r--r-- 47.7 KB
test -rwxr-xr-x 115 bytes
test.sh -rwxr-xr-x 21.9 KB

README.md

back to top