Skip to content

Enable psrpc claim-skip on queue rpcs behind config - #469

Merged
erikhortsch merged 1 commit into
mainfrom
erik/psrpc-skip-claim
Aug 24, 2026
Merged

Enable psrpc claim-skip on queue rpcs behind config#469
erikhortsch merged 1 commit into
mainfrom
erik/psrpc-skip-claim

Conversation

@erikhortsch

Copy link
Copy Markdown
Contributor

What

psrpc v0.7.5 lets a server answer an advertised queue rpc with an announcement instead of the claim round trip, removing one bus round trip per call. Clients on v0.7.5+ advertise support automatically; the server elects per request via psrpc.WithServerSkipClaim(func() bool).

This PR:

  • bumps psrpc v0.7.4 → v0.7.5
  • adds psrpc_skip_claim (bool, default off) to ServiceConfig, read once at startup — ingress has no live config reload, so flipping it requires a restart
  • passes psrpc.WithServerSkipClaim to the IngressHandler server constructions

Server coverage

Server Site Claim+queue methods Wired
IngressHandler pkg/service/process_manager.go UpdateIngress, DeleteIngress, DeleteWHIPResource, ICERestartWHIPResource yes
IngressHandler pkg/whip/whip_handler.go same yes
IngressHandler pkg/whip/whip_proxy_handler.go same yes
IngressInternal pkg/service/service.go none (StartIngress is claim-only/non-queue, ListActiveIngress is multi) no — nothing to skip

Client side

The bump alone makes ingress's psrpc clients advertise skip support, so the per-session IOInfo calls (GetIngressInfo, UpdateIngressState) skip the claim once the IO server enables it — no config needed here for that.

Dependency note

livekit/protocol#1729 added a process-wide rpc.SetPSRPCServerSkipClaim gate, but it only reaches servers built with the protocol's server-option helpers, which ingress doesn't use — and bumping protocol past v1.50.4 currently breaks the build against server-sdk-go v2.18.1 (TransferSIPParticipant signature change). So this PR stays on protocol v1.50.4 and passes psrpc.WithServerSkipClaim directly at the construction sites, which is equivalent.

Verified

  • go build ./... clean (macOS, GStreamer 1.28 via Homebrew)
  • go test -race on all non-integration packages: pass
  • Integration tests (//go:build integration) deferred to CI

🤖 Generated with Claude Code

psrpc v0.7.5 lets a server answer an advertised queue rpc with an
announcement instead of the claim round trip. Add psrpc_skip_claim
(default off) and pass psrpc.WithServerSkipClaim to the three
IngressHandler server constructions, whose UpdateIngress /
DeleteIngress / DeleteWHIPResource / ICERestartWHIPResource methods
are claim+queue. IngressInternal has no claim+queue methods, so it is
left as is.

The bump alone also makes ingress's psrpc clients advertise skip
support, so per-session IOInfo calls (GetIngressInfo,
UpdateIngressState) skip the claim once the IO server enables it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@erikhortsch
erikhortsch merged commit 6c91134 into main Aug 24, 2026
11 checks passed
@erikhortsch
erikhortsch deleted the erik/psrpc-skip-claim branch August 24, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants