Fixed comments for function maxIndexForService

This commit is contained in:
Pierre Souchay 2018-02-20 23:57:28 +01:00
parent 09351ba9a6
commit a8d3745104
1 changed files with 3 additions and 2 deletions

View File

@ -760,8 +760,9 @@ func (s *Store) ServicesByNodeMeta(ws memdb.WatchSet, filters map[string]string)
} }
// maxIndexForService return the maximum Raft Index for a service // maxIndexForService return the maximum Raft Index for a service
// If the index is not set for the service, it will return the max // If the index is not set for the service, it will return:
// Raft Index of "nodes", "services" // - maxIndex(nodes, services) if checks if false
// - maxIndex(nodes, services, checks) if checks if false
func maxIndexForService(tx *memdb.Txn, serviceName string, checks bool) (uint64, error) { func maxIndexForService(tx *memdb.Txn, serviceName string, checks bool) (uint64, error) {
transaction, err := tx.First("index", "id", serviceIndexName(serviceName)) transaction, err := tx.First("index", "id", serviceIndexName(serviceName))
if err == nil { if err == nil {