From d83ff8b8c99118ae5301cd4e9139f2f74e0dab16 Mon Sep 17 00:00:00 2001 From: Alex Munda Date: Wed, 30 Jun 2021 12:30:44 -0500 Subject: [PATCH] Update comment about idempotency check --- nomad/job_endpoint.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nomad/job_endpoint.go b/nomad/job_endpoint.go index e35c9e1a8..a018fe528 100644 --- a/nomad/job_endpoint.go +++ b/nomad/job_endpoint.go @@ -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)