From c70f2a126940c8ba8e08fe37a4bffdf5c42e213f Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Fri, 19 Jun 2020 15:39:44 -0400 Subject: [PATCH] Revert "client: defensive against getting stale alloc updates" --- client/client.go | 4 ---- client/util.go | 2 +- vendor/google.golang.org/appengine/internal/regen.sh | 0 3 files changed, 1 insertion(+), 5 deletions(-) mode change 100644 => 100755 vendor/google.golang.org/appengine/internal/regen.sh diff --git a/client/client.go b/client/client.go index b5bd9cdcbb9..3cac9ddcde5 100644 --- a/client/client.go +++ b/client/client.go @@ -1938,9 +1938,6 @@ func (c *Client) allocSync() { // allocUpdates holds the results of receiving updated allocations from the // servers. type allocUpdates struct { - // index is index of server store snapshot used for fetching alloc status - index uint64 - // pulled is the set of allocations that were downloaded from the servers. pulled map[string]*structs.Allocation @@ -2123,7 +2120,6 @@ OUTER: filtered: filtered, pulled: pulledAllocs, migrateTokens: resp.MigrateTokens, - index: resp.Index, } select { diff --git a/client/util.go b/client/util.go index b8690f647c6..af3bd75400b 100644 --- a/client/util.go +++ b/client/util.go @@ -33,7 +33,7 @@ func diffAllocs(existing map[string]uint64, allocs *allocUpdates) *diffResult { _, filtered := allocs.filtered[existID] // If not updated or filtered, removed - if !pulled && !filtered && allocs.index > existIndex { + if !pulled && !filtered { result.removed = append(result.removed, existID) continue } diff --git a/vendor/google.golang.org/appengine/internal/regen.sh b/vendor/google.golang.org/appengine/internal/regen.sh old mode 100644 new mode 100755