-
Notifications
You must be signed in to change notification settings - Fork 476
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
[service-utils] fix: crash if Kafka connects more than once #6387
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 87fda16 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6387 +/- ##
=======================================
Coverage 54.71% 54.71%
=======================================
Files 874 874
Lines 54617 54617
Branches 3717 3717
=======================================
Hits 29885 29885
Misses 24637 24637
Partials 95 95
|
size-limit report 📦
|
PR-Codex overview
This PR introduces a mechanism in the
KafkaProducer
class to ensure that theconnect()
method is called only once using a promise. This change improves connection management by allowing concurrent calls without redundancy.Detailed summary
isConnected
boolean flag.connectPromise
property to manage the connection state.connect()
method to cache the connection promise.await this.connect()
.