Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Fix/mitigate data race in kafka source #1266

Merged
merged 1 commit into from
May 26, 2020

Conversation

slinkydeveloper
Copy link
Contributor

@slinkydeveloper slinkydeveloper commented May 26, 2020

Signed-off-by: Francesco Guardiani francescoguard@gmail.com

(Maybe) mitigate/fixes #1262

From the diagnostic (#1262 (comment)), for some reason looks like Cleanup() is invoked two times, but i can't find why (I've analysed the code in sarama but it doesn't look like their problem). To mitigate it, I've added a sync.Once.

I've also moved the code to merge the error channels in another function

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label May 26, 2020
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 26, 2020
@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2020
@slinkydeveloper slinkydeveloper changed the title Added tracing to prometheus source Fix/mitigate data race in kafka source May 26, 2020
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-contrib-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
kafka/common/pkg/kafka/consumer_factory.go 100.0% 83.9% -16.1
kafka/common/pkg/kafka/consumer_handler.go 88.9% 89.5% 0.6

Copy link
Contributor

@n3wscott n3wscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 26, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: n3wscott, slinkydeveloper

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@slinkydeveloper
Copy link
Contributor Author

/retest

@knative-prow-robot knative-prow-robot merged commit 41d31ac into knative:master May 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[flaky] test/e2e.TestKafkaBinding/no_event
5 participants