cloud: add a doc for plan replayer - #23682
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughPlan Replayer documentation was added for TiDB Cloud. It covers file generation, Support access authorization, access management, security, and retention. Essential and Premium table of contents files now link to the guide. ChangesPlan Replayer User Guide
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🟡 Moderate · up to The guide currently gives Premium users an incorrect Plan Replayer download method, which may prevent them from retrieving diagnostic files; this documentation issue should be corrected before merge. Other requested changes are minor clarifications. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 7842c10b-bb99-44ef-aa92-2d986344a5d0
📒 Files selected for processing (1)
tidb-cloud/premium/plan-replayer-user-guide.md
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
|
@qw4990: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Team
Run ID: 7e084e23-4f98-4f2a-86d7-a0b41841a9a2
📒 Files selected for processing (3)
TOC-tidb-cloud-essential.mdTOC-tidb-cloud-premium.mdtidb-cloud/plan-replayer.md
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
|
|
||
| Plan Replayer is designed to share optimizer and execution-plan context without exporting actual table rows. Nevertheless, SQL text, object names, table definitions, configuration, bindings, and statistics can contain business-sensitive information. Use the minimum necessary access duration and revoke access after the investigation. | ||
|
|
||
| Plan Replayer files are temporary diagnostic artifacts. TiDB may remove generated files automatically after their retention period. Generate a new file if the previous identifier has expired or is no longer available. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
printf '%s\n' '--- repository knowledge files ---'
find /tmp/coderabbit-repo-knowledge/pingcap-docs-9c73f70c -maxdepth 2 -type f -print
printf '%s\n' '--- scoped convention headers ---'
head -5 /tmp/coderabbit-repo-knowledge/pingcap-docs-9c73f70c/*/*.md 2>/dev/null
printf '%s\n' '--- target document ---'
cat -n tidb-cloud/plan-replayer.md | sed -n '1,100p'
printf '%s\n' '--- referenced contract ---'
cat -n sql-plan-replayer.md | sed -n '50,90p'Repository: pingcap/docs
Length of output: 9321
🏁 Script executed:
printf '%s\n' '--- Plan Replayer files and retention references ---'
git ls-files '*plan-replayer*'
rg -n -i -C 2 'at most one hour|retention period|retention policy|Plan Replayer files|SQL Plan Replayer Files Access Authorization' --glob '*.md' --glob '*.mdx' .
printf '%s\n' '--- target diff summary and hunk ---'
git diff --stat -- tidb-cloud/plan-replayer.md
git diff -- tidb-cloud/plan-replayer.md | sed -n '1,180p'Repository: pingcap/docs
Length of output: 48079
🌐 Web query:
TiDB Cloud release 8.5 Plan Replayer file retention at most one hour
💡 Result:
In TiDB, including version 8.5, ZIP files generated by the PLAN REPLAYER command are stored in the TiDB cluster for a maximum of one hour, after which they are automatically deleted [1][2]. It is important to distinguish this from the PLAN REPLAYER CAPTURE functionality, where the resulting files are retained in the cluster for up to one week [1][2][3]. The one-hour retention for standard PLAN REPLAYER files is a built-in behavior, and users are advised to download the file promptly after generation to avoid data loss [1][4]. While community discussions have noted this constraint and explored potential improvements, the one-hour retention remains the standard behavior in current versions [5].
Citations:
- 1: https://docs.pingcap.com/tidb/stable/sql-plan-replayer/
- 2: https://docs.pingcap.com/tidb/dev/sql-plan-replayer/
- 3: https://docs.pingcap.com/tidb/v8.1/sql-plan-replayer/
- 4: https://docs.pingcap.com/tidb/v7.5/sql-plan-replayer/
- 5: GitHub issue 69100 in pingcap/tidb (link omitted to avoid creating a cross-reference)
Document the one-hour retention period.
| Plan Replayer files are temporary diagnostic artifacts. TiDB may remove generated files automatically after their retention period. Generate a new file if the previous identifier has expired or is no longer available. | |
| Plan Replayer files are temporary diagnostic artifacts. TiDB stores generated ZIP files for at most one hour and deletes them after one hour. Generate a new file if the previous identifier has expired or is no longer available. |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2a936c6 to
1a4c2b4
Compare
|
/approve |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiancai The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
New Features
Documentation