Skip to content

Document RoadRunnerStore ttl / waitTtl options; fix wrong defaults#7

Open
gam6itko wants to merge 1 commit into
roadrunner-php:1.xfrom
gam6itko:wait-ttl-comment
Open

Document RoadRunnerStore ttl / waitTtl options; fix wrong defaults#7
gam6itko wants to merge 1 commit into
roadrunner-php:1.xfrom
gam6itko:wait-ttl-comment

Conversation

@gam6itko

@gam6itko gam6itko commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Why

  • The constructor docblock claimed $initialTtl "Defaults to 0 (forever)", but the actual default is 300.0 seconds — the doc was simply wrong.
  • $initialWaitTtl had no explanation of what its default of 0 does.
  • withTtl() carried the same misleading "Defaults to 0 (forever)" text for a $ttl argument that has no default (it's required).

Verified behavior of waitTTL=0 against the server plugin (roadrunner-server/lock, rpc.go): a wait of 0 is floored to defaultImmediateTimeout (1ms), so acquiring an already-held lock fails almost immediately —
effectively non-blocking. A positive value blocks for up to that duration. (Same clarification as roadrunner-php/lock#9.)

Changes

  • Fix the $initialTtl default in the constructor docblock (300, not 0).
  • Document $initialWaitTtl (default 0 → non-blocking, 1ms server cap; positive blocks).
  • Clean up the withTtl() docblock (drop the bogus default, describe null $waitTtl).
  • Add a Store options section to the README with a defaults table and a withTtl() example.

Docs only — no behavior changes.

The constructor docblock claimed `$initialTtl` "Defaults to 0 (forever)",
but the actual default is 300 seconds. `$initialWaitTtl` had no explanation
of what its default of 0 does. `withTtl()` carried the same misleading
"Defaults to 0 (forever)" text for a required `$ttl` argument.

- Fix the `$initialTtl` default (300, not 0) in the constructor docblock.
- Document `$initialWaitTtl`: default 0 is effectively non-blocking (the
  RoadRunner server caps a 0 wait at 1ms), a positive value blocks.
- Clean up the `withTtl()` docblock (no bogus default; describe null waitTtl).
- Add a "Store options" section to the README with a defaults table and a
  withTtl() example.

Docs only — no behavior changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@gam6itko, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 34 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4fc20df1-ac6e-4c2f-9b73-cda0f15cad34

📥 Commits

Reviewing files that changed from the base of the PR and between a0bde19 and e1f72da.

📒 Files selected for processing (2)
  • README.md
  • src/RoadRunnerStore.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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