Added logs when deletion fails so we can rely on server logs

This commit is contained in:
vishalnayak 2017-05-03 12:46:54 -04:00
parent bc5d5b7319
commit 6aa7f9b7c9

View file

@ -1159,6 +1159,7 @@ func (ts *TokenStore) handleTidy(req *logical.Request, data *framework.FieldData
ts.logger.Debug("token: deleting invalid secondary index entry", "salted_token", child)
err = ts.view.Delete(parentPrefix + parent + "/" + child)
if err != nil {
ts.logger.Debug("token: failed to delete secondary index entry", "err", err)
tidyErrors = multierror.Append(tidyErrors, fmt.Errorf("failed to delete secondary index entry: %v", err))
}
deletedCountParentList++