fixup: Log when we detect out of order updates

This commit is contained in:
Danielle Tomlinson 2018-12-17 15:55:36 +01:00
parent 986fde0f5a
commit f2bb13818e
1 changed files with 3 additions and 0 deletions

View File

@ -624,6 +624,9 @@ func (ar *allocRunner) Update(update *structs.Allocation) {
// and return. This case shouldn't happen, but may in the case of a bug
// elsewhere inside the system.
if oldUpdate.AllocModifyIndex > update.AllocModifyIndex {
ar.logger.Warn("Discarding allocation update due to newer alloc revision in queue",
"old_modify_index", oldUpdate.AllocModifyIndex,
"new_modify_index", update.AllocModifyIndex)
ar.allocUpdatedCh <- oldUpdate
return
}