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

Kafka Scaler: Improve error logging for GetBlock() method #4232

Closed
dttung2905 opened this issue Feb 13, 2023 · 0 comments · Fixed by #4233
Closed

Kafka Scaler: Improve error logging for GetBlock() method #4232

dttung2905 opened this issue Feb 13, 2023 · 0 comments · Fixed by #4233
Labels
feature-request All issues for new features that have not been committed to needs-discussion

Comments

@dttung2905
Copy link
Contributor

Proposal

Currently, in case of error getting partition block, the error is hidden as GetBlock() method from sarama does not return the specific error (link)

	block := offsets.GetBlock(topic, partitionID)
	if block == nil {
		errMsg := fmt.Errorf("error finding offset block for topic %s and partition %d", topic, partitionID)
		s.logger.Error(errMsg, "")
		return 0, 0, errMsg
	}

This makes it very hard to debug the real reason as highlighted in #4215. We can print out the offsets.Blocks for more information

Use-Case

No response

Is this a feature you are interested in implementing yourself?

Yes

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant