Skip to content

config: change RUScale default value to 1.40#1924

Merged
ti-chi-bot[bot] merged 1 commit into
tikv:masterfrom
oh-my-tidb:feature/ru-scale-default-1.40
Mar 26, 2026
Merged

config: change RUScale default value to 1.40#1924
ti-chi-bot[bot] merged 1 commit into
tikv:masterfrom
oh-my-tidb:feature/ru-scale-default-1.40

Conversation

@disksing
Copy link
Copy Markdown
Collaborator

@disksing disksing commented Mar 26, 2026

Change the default value of RUScale from 5697.054498 to 1.40.

Summary by CodeRabbit

  • Chores
    • Updated the default resource unit scaling configuration to improve resource calculation accuracy.

@ti-chi-bot ti-chi-bot Bot added dco-signoff: yes Indicates the PR's author has signed the dco. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 26, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 82e21470-9f35-4830-8fca-85039d892cd8

📥 Commits

Reviewing files that changed from the base of the PR and between 0f7b57d and 560f17a.

📒 Files selected for processing (2)
  • config/client.go
  • config/ruv2_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/client.go

📝 Walkthrough

Walkthrough

Changed the default RU v2 TiKV configuration by updating RUV2TiKVConfig.RUScale in DefaultRUV2TiKVConfig() from 5697.054498 to 1.40. A corresponding test expectation was updated to match the new computed value. No control flow or public signatures changed.

Changes

Cohort / File(s) Summary
RU v2 Configuration & Test
config/client.go, config/ruv2_test.go
Changed default RUV2TiKVConfig.RUScale from 5697.054498 to 1.40 and updated the test expectation for TiKVRUV2() to the new computed value (38.64481334).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

lgtm, approved

Suggested reviewers

  • nolouch
  • ekexium

Poem

🐰 Once a scale so high and wide,
I hopped and nudged it down to glide.
From thousands to one-point-four I flew,
Soft steps of code — a gentle review. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: updating the RUScale default value from 5697.054498 to 1.40 in the config module.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

Signed-off-by: disksing <i@disksing.com>
@disksing disksing force-pushed the feature/ru-scale-default-1.40 branch from 0f7b57d to 560f17a Compare March 26, 2026 04:52
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@config/client.go`:
- Around line 147-148: DefaultTiKVClient()/UpdateTiKVRUV2FromExecDetailsV2
currently applies DefaultRUV2TiKVConfig (RUScale 1.40) unconditionally to
ExecDetailsV2.RuV2; change this so the new scale is only applied when the TiKV
server advertises the new RU v2 unit or is at/above the minimum version that
introduced it. Concretely, add a version/capability check in
UpdateTiKVRUV2FromExecDetailsV2 (or in DefaultTiKVClient before calling it) that
inspects the server version/capabilities and only calls DefaultRUV2TiKVConfig()
when the server supports the new RU v2 semantics; otherwise preserve legacy
scaling (or skip rescaling). Also add/update the code comment and public docs to
state the minimum TiKV version or capability required for the new RUScale.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 603e5650-dabd-4d6b-a845-8f5ef2646ab7

📥 Commits

Reviewing files that changed from the base of the PR and between 77f0a1d and 0f7b57d.

📒 Files selected for processing (1)
  • config/client.go

Comment thread config/client.go
@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 26, 2026
@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 26, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Mar 26, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-03-26 05:11:33.038662967 +0000 UTC m=+417889.074733227: ☑️ agreed by JmPotato.
  • 2026-03-26 05:34:10.946255817 +0000 UTC m=+419246.982326077: ☑️ agreed by nolouch.

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Mar 26, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekexium, JmPotato, nolouch

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Mar 26, 2026
@ti-chi-bot ti-chi-bot Bot merged commit 7286767 into tikv:master Mar 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants