Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors returned by admin DeleteRecords are inconsistent #2225

Closed
dnwe opened this issue May 6, 2022 · 0 comments · Fixed by #2226
Closed

errors returned by admin DeleteRecords are inconsistent #2225

dnwe opened this issue May 6, 2022 · 0 comments · Fixed by #2226

Comments

@dnwe
Copy link
Collaborator

dnwe commented May 6, 2022

RE: admin.go#L576-L623

  1. it sometimes returns 1 single Kerror when a partition leader could not be found (and ignores the requests to all the other partitions), while sometimes it will return ErrDeleteRecords with any per partition errors wrapped. It should really consistently return 1 type of error
  2. errs = append(errs, errors.New(deleteRecordsResponsePartition.Err.Error()))
    when it wraps the Kerror from each partition, it creates a new error from the string which makes the error type checking difficult. I would expect it to preserve the Kerror type.
dnwe added a commit that referenced this issue May 11, 2022
Also prevent a few other creations of new errors where the existing
KError should have been preserved for errors.Is checking.

Fixes #2225
k-wall pushed a commit to k-wall/sarama that referenced this issue May 23, 2022
Also prevent a few other creations of new errors where the existing
KError should have been preserved for errors.Is checking.

Fixes IBM#2225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant