Revert "client: defensive against getting stale alloc updates"
This commit is contained in:
parent
bf08b7a890
commit
3824e0362c
|
@ -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 {
|
||||
|
|
|
@ -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
0
vendor/google.golang.org/appengine/internal/regen.sh
generated
vendored
Normal file → Executable file
Loading…
Reference in New Issue