Skip to content

fix(service): bound the indexes a service has open - #169

Open
PiquelChips wants to merge 1 commit into
fix/store-statements-needing-a-promotion-onlyfrom
fix/bound-the-indexes-a-service-has
Open

PiquelChips wants to merge 1 commit into
fix/store-statements-needing-a-promotion-onlyfrom
fix/bound-the-indexes-a-service-has

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

A service kept at most eight idle indexes, but whenever all of them were in use it opened another one, with no limit. Landings queued behind a slow landing could each hold a whole index in memory at the same time.

Calls now take an index, or room to open one, from a counting semaphore. Once OriginService::MAX_INDEXES (8) are open, further calls wait for one to come back. The slot is returned even if the call panics.

Part of #166.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d1015e32-334d-4699-b14b-71e6c059e76e

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)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@PiquelChips
PiquelChips added this pull request to stack #185 November 22, 2026 20:21
@PiquelChips
PiquelChips removed this pull request from stack #185 November 22, 2026 20:22
A service kept at most eight idle indexes, but opened a new one whenever
every kept one was in use, so landings queued behind a slow one could
each hold a whole index in memory, without limit.

Calls now take an index, or room to open one, from a counting semaphore:
past `MAX_INDEXES` open, they wait for one to come back. The room is given
back even if the call panics.
@PiquelChips
PiquelChips force-pushed the fix/store-statements-needing-a-promotion-only branch from e620b61 to cb41439 Compare November 22, 2026 20:22
@PiquelChips
PiquelChips force-pushed the fix/bound-the-indexes-a-service-has branch from 842064c to 6c748a3 Compare November 22, 2026 20:22
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