Merge pull request #38200 from hongchaodeng/e

Automatic merge from submit-queue (batch tested with PRs 37032, 38119, 38186, 38200, 38139)

etcd2: remove unnecessary PrevValue in SetOption

ref: https://github.com/kubernetes/kubernetes/issues/37994

Summary:
- PrevValue is set in HTTP header, and large value (>1MB) could exceed check limit
- We don't need PrevValue indeed since we already use PrevIndex in SetOptions and each PrevIndex corresponds to each PrevValue.

I don't really think we need extra tests for this. There is already test for GuaranteedUpdate covering its use cases.
This commit is contained in:
Kubernetes Submit Queue 2016-12-06 18:29:38 -08:00 committed by GitHub
commit 6cfe041b53

View File

@ -525,7 +525,6 @@ func (h *etcdHelper) GuaranteedUpdate(
startTime := time.Now()
// Swap origBody with data, if origBody is the latest etcd data.
opts := etcd.SetOptions{
PrevValue: origBody,
PrevIndex: index,
TTL: time.Duration(ttl) * time.Second,
}