Skip to content

Commit

Permalink
use leader's timestamp from RPC call
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Jul 14, 2022
1 parent 3efb883 commit 9d8138c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nomad/acl_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,8 @@ func (a *ACL) ExpireOneTimeTokens(args *structs.OneTimeTokenExpireRequest, reply
}
}

args.Timestamp = time.Now() // use the leader's timestamp

// Expire token via raft; because this is the only write in the RPC the
// caller can safely retry with the same token if the raft write fails
_, index, err := a.srv.raftApply(structs.OneTimeTokenExpireRequestType, args)
Expand Down

0 comments on commit 9d8138c

Please sign in to comment.