Fix blocking for ServiceDumping by kind (#6919)

pull/6924/head
Matt Keeler 5 years ago committed by GitHub
parent 5a88d4ebe1
commit e81e338260
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -208,14 +208,18 @@ func (s *Store) catalogInsertService(tx *memdb.Txn, svc *structs.ServiceNode) er
return fmt.Errorf("failed inserting service: %s", err)
}
// overall services index
if err := tx.Insert("index", &IndexEntry{"services", svc.ModifyIndex}); err != nil {
return fmt.Errorf("failed updating index: %s", err)
if err := s.catalogUpdateServicesIndexes(tx, svc.ModifyIndex, &svc.EnterpriseMeta); err != nil {
return err
}
if err := s.catalogUpdateServiceIndexes(tx, svc.ServiceName, svc.ModifyIndex, &svc.EnterpriseMeta); err != nil {
return err
}
if err := s.catalogUpdateServiceKindIndexes(tx, svc.ServiceKind, svc.ModifyIndex, &svc.EnterpriseMeta); err != nil {
return err
}
return nil
}

Loading…
Cancel
Save