mirror of https://github.com/status-im/consul.git
consul: Adding consistent read enforcement
This commit is contained in:
parent
e706c988b8
commit
e5e97274d4
|
@ -244,6 +244,13 @@ RUN_QUERY:
|
||||||
// Update the query meta data
|
// Update the query meta data
|
||||||
s.setQueryMeta(m)
|
s.setQueryMeta(m)
|
||||||
|
|
||||||
|
// Check if query must be consistent
|
||||||
|
if b.RequireConsistent {
|
||||||
|
if err := s.consistentRead(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Run the query function
|
// Run the query function
|
||||||
err := run()
|
err := run()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue