nomad: avoid replication consistency issues by setting MinQueryIndex

This commit is contained in:
Armon Dadgar
2017-08-24 09:57:14 -07:00
parent e9790c63b4
commit 8688e9210e

View File

@@ -721,9 +721,10 @@ START:
req := structs.ACLPolicySetRequest{
Names: update,
QueryOptions: structs.QueryOptions{
Region: s.config.AuthoritativeRegion,
SecretID: s.ReplicationToken(),
AllowStale: true,
Region: s.config.AuthoritativeRegion,
SecretID: s.ReplicationToken(),
AllowStale: true,
MinQueryIndex: resp.Index - 1,
},
}
var reply structs.ACLPolicySetResponse
@@ -865,9 +866,10 @@ START:
req := structs.ACLTokenSetRequest{
AccessorIDS: update,
QueryOptions: structs.QueryOptions{
Region: s.config.AuthoritativeRegion,
SecretID: s.ReplicationToken(),
AllowStale: true,
Region: s.config.AuthoritativeRegion,
SecretID: s.ReplicationToken(),
AllowStale: true,
MinQueryIndex: resp.Index - 1,
},
}
var reply structs.ACLTokenSetResponse