Merge pull request #8217 from hashicorp/revert-5906-b-alloc-stale-updates

Revert "client: defensive against getting stale alloc updates"
This commit is contained in:
Mahmood Ali
2020-06-19 17:02:01 -04:00
committed by GitHub
3 changed files with 1 additions and 5 deletions

View File

@@ -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 {

View File

@@ -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
}

0
vendor/google.golang.org/appengine/internal/regen.sh generated vendored Normal file → Executable file
View File