Skip to content

revert "fix: clean up listenQueues entry on listener disconnect (#397)"#416

Merged
mangelajo merged 1 commit intomainfrom
revert-pr-397
Apr 7, 2026
Merged

revert "fix: clean up listenQueues entry on listener disconnect (#397)"#416
mangelajo merged 1 commit intomainfrom
revert-pr-397

Conversation

@ambient-code
Copy link
Copy Markdown
Contributor

@ambient-code ambient-code Bot commented Apr 7, 2026

Summary

Reverts #397 which introduced a race condition causing intermittent E2E test failures with Error: Connection to exporter lost.

Root Cause

PR #397 added defer s.cleanupListenQueue(leaseName) to Listen(), which deletes the queue from listenQueues whenever the exporter's gRPC stream exits — including on transient errors. This races with Dial():

  1. Exporter's Listen() stream fails → defer fires → Q1 deleted
  2. Dial() had already called LoadOrStore → got Q1 → sends router token into Q1's buffer
  3. Token is now orphaned in a deleted channel
  4. Exporter reconnects → Listen()LoadOrStore creates Q2 (empty) → waits forever
  5. Client times out after 20s → "Connection to exporter lost"

See tracking issue: #414

What this revert does

Removes the defer s.cleanupListenQueue(leaseName) call and its associated test added in #397, restoring the pre-#397 behaviour where listen queues are not cleaned up on listener disconnect.

Known limitation

This reintroduces the queue leak that #397 was trying to fix: if an exporter disconnects and never reconnects, its listenQueues entry is never removed. A proper fix with timeout-based cleanup will be submitted as a follow-up PR.

🤖 Generated with Claude Code

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 7, 2026

Deploy Preview for jumpstarter-docs ready!

Name Link
🔨 Latest commit b0340dd
🔍 Latest deploy log https://app.netlify.com/projects/jumpstarter-docs/deploys/69d4e9e7d1e2ed00087fbaed
😎 Deploy Preview https://deploy-preview-416--jumpstarter-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 7, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 41b79037-8cff-4e2d-a0bc-10f4528aec01

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-pr-397

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mangelajo mangelajo enabled auto-merge April 7, 2026 11:27
@mangelajo mangelajo changed the title revert: revert "fix: clean up listenQueues entry on listener disconnect (#397)" revert "fix: clean up listenQueues entry on listener disconnect (#397)" Apr 7, 2026
@mangelajo mangelajo merged commit 20b7ee9 into main Apr 7, 2026
27 checks passed
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 this pull request may close these issues.

1 participant