Update comment about idempotency check

This commit is contained in:
Alex Munda
2021-06-30 12:30:44 -05:00
parent 850204870f
commit d83ff8b8c9

View File

@@ -1909,7 +1909,8 @@ func (j *Job) Dispatch(args *structs.JobDispatchRequest, reply *structs.JobDispa
dispatchJob.Meta[k] = v
}
// Check to see if an idempotency token was specified on the request
// Ensure that we have only one dispatched version of this job running concurrently
// by comparing the idempotency token against any non-terminal versions.
if args.IdempotencyToken != "" {
// Fetch all jobs that match the parameterized job ID prefix
iter, err := snap.JobsByIDPrefix(ws, parameterizedJob.Namespace, parameterizedJob.ID)