Repository navigation
perf(incentive): skip no-op buyer commits - #1270
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Gas snapshotNo gas changes vs base. |
Contracts coverageLine coverage: 88.92% (2488/2798 lines) |
Coverage reportTotal: 81.34% (was 81.25%, ▲ +0.09%) — 48155/59205 lines
History
|
ReviewOverviewReplaces the Correctness — looks solid ✅
Behavioral notes (fine, but worth stating)
Tests ✅
Nits (non-blocking)
Verdict: LGTM. Tight, well-documented perf fix with the right regression coverage; the doc comment on 🤖 Generated with Claude Code |
Co-Authored-By: Claude Fable 5 <[email protected]>
Summary
table_exists()read transaction from all four no-row operationsRoot cause
forgetandforget_if_channelcommitted unconditionally, so an absent row or channel mismatch still paid for aDurability::Immediatefsync. All four operations also ran a separate read transaction to avoid persisting the table implicitly created byWriteTransaction::open_table, even though an aborted write transaction rolls that creation back.Impact
No-row calls now use one write transaction and return before commit, avoiding both the preflight read and the no-op fsync. Actual deletions, progress advances, and deposit additions retain immediate durability, while compare-and-delete remains atomic in one serialized transaction.
Regression evidence
Removing only the pre-checks while retaining the old unconditional commit made
no_row_ops_do_not_create_the_tablefail withforget created the table. The same focused regression passes after the mutation guards, and a new reopen test confirms both deletion paths are durably committed.Validation
cargo test -p decdn-incentive --features redb --quietcargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo clippy -p decdn-incentive --no-default-features -- -D warningscargo clippy -p decdn-incentive --no-default-features --features buyer-store-core -- -D warningsCloses #1260