Before this patch, the tombstone can be deleted if its revision is equal
compacted revision. It causes that the watch subscriber won't get this
DELETE event. Based on Compact API[1], we should keep tombstone revision
if it's not less than the compaction revision.
> CompactionRequest compacts the key-value store up to a given revision.
> All superseded keys with a revision less than the compaction revision
> will be removed.
[1]: https://etcd.io/docs/latest/dev-guide/api_reference_v3/
Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit bbdc94181a6d67904b575ad936c20d1be10e220c)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit ee33652775842b96d1c0ab601ec3002078998c2a)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
The Go runtime uses runtime Finalizer to delete cert [[1]]. The
interestingGoroutines is able to collect stack like,
```plain
leak.go:103: Found leaked goroutined BEFORE test appears to have leaked :
sync.(*Map).LoadAndDelete(0xc00031e180, {0xe07320, 0xc00009fde0})
/usr/local/go/src/sync/map.go:272 +0x192
sync.(*Map).Delete(...)
/usr/local/go/src/sync/map.go:297
crypto/tls.(*certCache).evict(...)
/usr/local/go/src/crypto/tls/cache.go:73
crypto/tls.(*certCache).active.func1(0x0?)
/usr/local/go/src/crypto/tls/cache.go:65 +0x67
```
It's caused by GC instead of leaky goroutine. interestingGoroutines
should skip it.
Backport of #18287
[1]: 8e1fdea831/src/crypto/tls/cache.go (L63)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
The goal is to reproduce a DELETE event being dropped in a watch after a compaction
occurs on the revision where the deletion took place. In order to reproduce this, we
perform the following sequence (steps for reproduction thanks to @ahrtr):
- PUT k v2 (assume returned revision = r2)
- PUT k v3 (assume returned revision = r3)
- PUT k v4 (assume returned revision = r4)
- DELETE k (assume returned revision = r5)
- PUT k v6 (assume returned revision = r6)
- COMPACT r5
- WATCH rev=r5
We should get the DELETE event (r5) followed by the PUT event (r6). However, currently we only
get the PUT event with returned revision of r6 (key=k, val=v6).
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
(cherry picked from commit ebf2cac6bda38892121585d2467982da54e60ef1)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Backports a657f06, 22f20a8, 497f1a4 and 3e86af6 from #18186.
Also backports required test util elements of 4c77726 from #17661.
Signed-off-by: James Blair <mail@jamesblair.net>
The bucket is already fully public so new releases don't need to run this command.
This will prevent significant terminal spam during the release process as there are thousands of objects in the bucket.
Signed-off-by: James Blair <mail@jamesblair.net>
to v0.0.0-20230822172742-b8732ec3820d
bump tools/mod google.golang.org/genproto/googleapis/api
to v0.0.0-20230822172742-b8732ec3820d
Use the same version across all the modules from the project.
Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
bump honnef.co/go/tools to v0.0.1-2019.2.3
bump gopkg.in/yaml.v2 to v2.4.0
Use the same version across all the modules from the project.
Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
to v0.1.11
github.com/mattn/go-isatty v0.0.12 to v0.0.14
Use the same version across all the modules from the project.
Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
Backport of ba4b2bffeb
Related issue: https://github.com/etcd-io/etcd/issues/18180
As tools/mod is not part of the test library's modules, the check to verify
consistent dependency versions ignored it. Explicitly get the dependencies from
this module when running verify-dep.
Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>