fix ignored errors in state store internals as reported by errcheck

This commit is contained in:
R.B. Boyer 2019-03-01 13:28:35 -06:00 committed by R.B. Boyer
parent c7067645dd
commit 6955186239
2 changed files with 9 additions and 3 deletions

View File

@ -777,7 +777,9 @@ func (s *Store) ACLPolicyBatchDelete(idx uint64, policyIDs []string) error {
defer tx.Abort()
for _, policyID := range policyIDs {
s.aclPolicyDeleteTxn(tx, idx, policyID, "id")
if err := s.aclPolicyDeleteTxn(tx, idx, policyID, "id"); err != nil {
return err
}
}
if err := indexUpdateMaxTxn(tx, idx, "acl-policies"); err != nil {

View File

@ -77,7 +77,9 @@ func (s *Store) AutopilotSetConfig(idx uint64, config *autopilot.Config) error {
tx := s.db.Txn(true)
defer tx.Abort()
s.autopilotSetConfigTxn(idx, tx, config)
if err := s.autopilotSetConfigTxn(idx, tx, config); err != nil {
return err
}
tx.Commit()
return nil
@ -104,7 +106,9 @@ func (s *Store) AutopilotCASConfig(idx, cidx uint64, config *autopilot.Config) (
return false, nil
}
s.autopilotSetConfigTxn(idx, tx, config)
if err := s.autopilotSetConfigTxn(idx, tx, config); err != nil {
return false, err
}
tx.Commit()
return true, nil