mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-10 00:23:41 +00:00
Automatic merge from submit-queue etcd_watcher: make Deleted Event.Object's version consistent ### What's the problem? In [sendDelete()](995f022808/pkg/storage/etcd/etcd_watcher.go (L437-L442)
), Deleted Event.Object's resource version will be set to the latest resource version. This is actually an assumption made by cacher that all later events should have objects with larger verions; See [here](995f022808/pkg/storage/cacher.go (L579-L581)
). In sendModify(), it could also return Deleted event. However, the resource version is still the old version, which is inconsistent behavior with sendDelete(). ### What's this PR? This PR sets the version of oldObj in sendModify() to be the latest version. Provided unit test for it.