Simplify comments

Co-authored-by: Mahmood Ali <mahmood@hashicorp.com>
This commit is contained in:
Charlie Voiselle 2020-05-19 15:05:24 -04:00 committed by GitHub
parent 6976a7699e
commit 70303c906c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -316,10 +316,9 @@ func (op *Operator) SchedulerSetConfiguration(args *structs.SchedulerSetConfigRe
} else if respErr, ok := resp.(error); ok {
return respErr
}
// Unless this is a CAS request, Updated is always true at this point.
// If CAS request, raft returns a boolean indicating if the update was applied.
// Otherwise, assume success
reply.Updated = true
// Check if the return type is a bool and optionally overwrite Updated
// Only applies to CAS requests
if respBool, ok := resp.(bool); ok {
reply.Updated = respBool
}