mirror of https://github.com/status-im/consul.git
fix ignored errors in state store internals as reported by errcheck
This commit is contained in:
parent
c7067645dd
commit
6955186239
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue