We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2670651 commit 88f0be6Copy full SHA for 88f0be6
staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go
@@ -274,7 +274,20 @@ func (s *store) GuaranteedUpdate(
274
transformContext := authenticatedDataString(key)
275
for {
276
if err := preconditions.Check(key, origState.obj); err != nil {
277
- return err
+ // If our data is already up to date, return the error
278
+ if !mustCheckData {
279
+ return err
280
+ }
281
+
282
+ // It's possible we were working with stale data
283
+ // Actually fetch
284
+ origState, err = getCurrentState()
285
+ if err != nil {
286
287
288
+ mustCheckData = false
289
+ // Retry
290
+ continue
291
}
292
293
ret, ttl, err := s.updateState(origState, tryUpdate)
0 commit comments