From eab0826170f9440dfd0e38fbf44d865f914d56e0 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Tue, 24 Dec 2013 13:12:03 -0800 Subject: [PATCH] Mark a few txn's as being readonly --- consul/state_store.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/consul/state_store.go b/consul/state_store.go index 1e6ac42a80..3a959c627d 100644 --- a/consul/state_store.go +++ b/consul/state_store.go @@ -389,7 +389,7 @@ func (s *StateStore) DeleteNode(node string) error { // Services is used to return all the services with a list of associated tags func (s *StateStore) Services() map[string][]string { - tx, dbis, err := s.startTxn(false, dbServiceIndex) + tx, dbis, err := s.startTxn(true, dbServiceIndex) if err != nil { panic(fmt.Errorf("Failed to get node servicess: %v", err)) } @@ -424,7 +424,7 @@ func (s *StateStore) Services() map[string][]string { // ServiceNodes returns the nodes associated with a given service func (s *StateStore) ServiceNodes(service string) structs.ServiceNodes { - tx, dbis, err := s.startTxn(false, dbServiceIndex) + tx, dbis, err := s.startTxn(true, dbServiceIndex) if err != nil { panic(fmt.Errorf("Failed to get node servicess: %v", err)) } @@ -435,7 +435,7 @@ func (s *StateStore) ServiceNodes(service string) structs.ServiceNodes { // ServiceTagNodes returns the nodes associated with a given service matching a tag func (s *StateStore) ServiceTagNodes(service, tag string) structs.ServiceNodes { - tx, dbis, err := s.startTxn(false, dbServiceIndex) + tx, dbis, err := s.startTxn(true, dbServiceIndex) if err != nil { panic(fmt.Errorf("Failed to get node servicess: %v", err)) }