-
-
Notifications
You must be signed in to change notification settings - Fork 37
Fix : increment and forever #162
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
Fix : increment and forever #162
Conversation
…lue` summed `timestamp + 0`, and `forever` was not `forever` Fixed the `increment' method
…lue` summed `timestamp + 0`, and `forever` was not `forever` Fixed the `$ttl` in the `increment` method
WalkthroughFixes RoadRunnerStore increment to perform read-modify-write via get/put and correct TTL handling. Updates forever to use null TTL (no expiration) instead of 0. Adds corresponding notes to CHANGELOG. No public API signatures changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant S as RoadRunnerStore
participant KV as RoadRunner KV
rect rgb(235,245,255)
note over S: increment(key, value, ttl)
C->>S: increment(key, step=1, ttl?)
S->>S: get(key)
S->>KV: fetch current value
KV-->>S: value (or 0)
S->>S: newValue = current + step
S->>S: resolve TTL (existing or provided)
S->>S: put(key, newValue, ttl)
S->>KV: store with TTL
KV-->>S: ok
S-->>C: newValue
end
sequenceDiagram
autonumber
participant C as Client
participant S as RoadRunnerStore
participant KV as RoadRunner KV
rect rgb(240,255,240)
note over S: forever(key, value)
C->>S: forever(key, value)
S->>S: put(key, value, ttl=null)
S->>KV: store with no expiration
KV-->>S: ok
S-->>C: ok
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (4)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 PHPStan (2.1.28)Path /fixes does not exist 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. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
Description
The
forevermethod passed$secondsas 0,Spiral\RoadRunner\KeyValuesummedtimestamp + 0, andforeverwas notforeverFixed the
$ttlin theincrementmethodChecklist
CHANGELOG.mdfileSummary by CodeRabbit
Bug Fixes
Documentation