Merge pull request #25396 from hongchaodeng/w
Automatic merge from submit-queue
etcd3/watcher: Event.Object should have the same rev as etcd delete
### What's the problem?
When a delete is watched, the revision should be larger than any previous to guarantee ordering. However, currently etcd3 decodes the previous rev into returned object:
https://github.com/kubernetes/kubernetes/blob/995f022808d1407897a5b23373484ac683534390/pkg/storage/etcd3/watcher.go#L322
This will break, for example, cacher's assumption here if it re-watch.
https://github.com/kubernetes/kubernetes/blob/995f022808d1407897a5b23373484ac683534390/pkg/storage/cacher.go#L579-L581
The etcd2 impl. also takes the current ModifiedIndex to ensure it's a larger number:
https://github.com/kubernetes/kubernetes/blob/995f022808d1407897a5b23373484ac683534390/pkg/storage/etcd/etcd_watcher.go#L437-L442
### What's this PR?
It fixes above problem by using etcd's delete revision.
Showing
Please
register
or
sign in
to comment