From 73be3d8d795141fa91fb8e59a7bed15b2caf237b Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Mon, 24 Sep 2018 13:27:41 -0700 Subject: [PATCH] Better comment on snapshotindex --- nomad/structs/structs.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 68fd8d529d28..d4ea11036c37 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -6882,8 +6882,11 @@ type Evaluation struct { LeaderACL string // SnapshotIndex is the Raft index of the snapshot used to process the - // evaluation. As such it will only be set once it has gone through the - // scheduler. + // evaluation. The index will either be set when it has gone through the + // scheduler or if a blocked evaluation is being created. The index is set + // in this case so we can determine if an early unblocking is required since + // capacity has changed since the evaluation was created. This can result in + // the SnapshotIndex being less than the CreateIndex. SnapshotIndex uint64 // Raft Indexes