-
Notifications
You must be signed in to change notification settings - Fork 710
v8.5.5: doc updates for v8.5.5 #22305
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
Merged
Merged
Changes from 13 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
2225bb9
v8.5.5 br: add variable `tidb_advancer_check_point_lag_limit` to cont…
ti-chi-bot dd233dc
v8.5.5: Add circuit breaker variable (#20129) (#22171)
ti-chi-bot dd0fb09
v8.5.5 br: add compact log backup (#20342) (#22209)
ti-chi-bot e9a4dd1
v8.5.5 br: add compatibility between log backup and PITR (#20485) (#2…
ti-chi-bot 8e9d2d2
Merge branch 'release-8.5' into feature/preview-v8.5.5
qiancai 3e6d7e6
v8.5.5 br: remove outdated PITR limitation (#22262) (#22264)
ti-chi-bot 2e6ca82
v8.5.5 br: pitr filter feature release doc (#21109) (#22199)
ti-chi-bot 17b506f
v8.5.5 restore: update the definition of the parameter --load-stats a…
ti-chi-bot 15ee7a0
v8.5.5 br: support pitr filter and concurrent restore (#21835) (#22201)
ti-chi-bot f9a1834
v8.5.5 br: pitr restore mode (#21254) (#22238)
ti-chi-bot 3d1c460
v8.5.5 br: provide a storage target option for BR restore checkpoint …
ti-chi-bot 14f5dc5
v8.5.5 br: improve visualization of BR (#20493) (#22237)
ti-chi-bot 846f118
Merge branch 'release-8.5' into feature/preview-v8.5.5
qiancai 157a642
v8.5.5 br: add ddl job none error report (#22300) (#22308)
ti-chi-bot 5d9eb98
v8.5.5: add config for graceful shutdown (#22158)
hujiatao0 d68ac51
Merge branch 'release-8.5' into feature/preview-v8.5.5
qiancai 0a8c7a1
v8.5.5: Add index lookup push down content (#22196) (#22252)
ti-chi-bot fd00a09
v8.5.5: include storage engines in slow query logs and statements sum…
ti-chi-bot e33ffab
v8.5.5: add doc for async-batch-get (#22152) (#22311)
ti-chi-bot 7c03ee9
Merge branch 'release-8.5' into feature/preview-v8.5.5
qiancai 28c2a0d
v8.5.5 pd,tidb: support affinity schedule (#22270) (#22315)
ti-chi-bot d0f71b3
v8.5.5: add store limit support (#22297) (#22314)
ti-chi-bot d6c3e74
v8.5.5: Add unified.cpu-threshold config (#22167) (#22312)
ti-chi-bot e42b42f
v8.5.5 scheduler: network slow store scheduler enhancement (#22269) (…
ti-chi-bot da93fa6
v8.5: bump up the latest version to v8.5.5 (#22322)
qiancai 91a88fa
Merge branch 'release-8.5' into feature/preview-v8.5.5
qiancai b5b1386
v8.5.5 br: add a new authentication method for Azure (#22267) (#22324)
ti-chi-bot 2c276f6
Update upgrade-tidb-using-tiup.md
qiancai 392f679
Update upgrade-tidb-using-tiup.md
qiancai e466dbd
Update upgrade-tidb-using-tiup.md
qiancai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| --- | ||
| title: Compact Log Backup | ||
| summary: Learn how to improve Point-in-time Recovery (PITR) efficiency by compacting log backups into the SST format. | ||
| --- | ||
|
|
||
| # Compact Log Backup | ||
|
|
||
| This document describes how to improve the efficiency of point-in-time recovery ([PITR](/glossary.md#point-in-time-recovery-pitr)) by compacting log backups into the [SST](/glossary.md#static-sorted-table--sorted-string-table-sst) format. | ||
|
|
||
| ## Overview | ||
|
|
||
| Traditional log backups store write operations in a highly unstructured manner, which can lead to the following issues: | ||
|
|
||
| - **Reduced recovery performance**: unordered data has to be written to the cluster one by one through the Raft protocol. | ||
| - **Write amplification**: all writes must be compacted from L0 to the bottommost level by level. | ||
| - **Dependency on full backups**: frequent full backups are required to control the amount of recovery data, which can impact application operations. | ||
|
|
||
| Starting from v8.5.5, the compact log backup feature provides offline compaction capabilities, converting unstructured log backup data into structured SST files. This results in the following improvements: | ||
|
|
||
| - SST files can be quickly imported into the cluster, **improving recovery performance**. | ||
| - Redundant data is removed during compaction, **reducing storage space consumption**. | ||
| - You can set longer full backup intervals while ensuring the Recovery Time Objective (RTO), **reducing the impact on applications**. | ||
|
|
||
| ## Limitations | ||
|
|
||
| - Compact log backup is not a replacement for full backups. It must be used in conjunction with periodic full backups. To ensure PITR capability, the compacting process retains all MVCC versions. Failing to perform full backups for a long time can lead to excessive storage usage and might cause issues when restoring data later. | ||
| - Currently, compacting backups with local encryption enabled is not supported. | ||
|
|
||
| ## Use compact log backup | ||
|
|
||
| Currently, only manual compaction of log backups is supported, and the process is complex. **It is recommended to use the upcoming TiDB Operator solution for compacting log backups in production environments.** | ||
|
|
||
| ### Manual compaction | ||
|
|
||
| This section describes the steps for manually compacting log backups. | ||
|
|
||
| #### Prerequisites | ||
|
|
||
| Manual compaction of log backups requires two tools: `tikv-ctl` and `br`. | ||
|
|
||
| #### Step 1: Encode storage to Base64 | ||
|
|
||
| Execute the following encoding command: | ||
|
|
||
| ```shell | ||
| br operator base64ify --storage "s3://your/log/backup/storage/here" --load-creds | ||
| ``` | ||
|
|
||
| > **Note:** | ||
| > | ||
| > - If the `--load-creds` option is included when you execute the preceding command, the encoded Base64 string contains credential information loaded from the current BR environment. Note to ensure proper security and access control. | ||
qiancai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| > - The `--storage` value matches the storage output from the `log status` command of the log backup task. | ||
| #### Step 2: Execute log compaction | ||
|
|
||
| With the Base64-encoded storage, you can initiate the compaction using `tikv-ctl`. Note that the default log level of `tikv-ctl` is `warning`. Use `--log-level info` to obtain more detailed information: | ||
|
|
||
| ```shell | ||
| tikv-ctl --log-level info compact-log-backup \ | ||
| --from "<start-tso>" --until "<end-tso>" \ | ||
| -s 'bAsE64==' -N 8 | ||
| ``` | ||
|
|
||
| Parameter descriptions: | ||
|
|
||
| - `-s`: the Base64-encoded storage string obtained earlier. | ||
| - `-N`: the maximum number of concurrent log compaction tasks. | ||
| - `--from`: the start timestamp for compaction. | ||
| - `--until`: the end timestamp for compaction. | ||
|
|
||
| The `--from` and `--until` parameters define the time range for the compaction operation. The compaction operation handles all log files containing write operations within the specified time range, so the generated SST files might include data outside this range. | ||
|
|
||
| To obtain the timestamp for a specific point in time, execute the following command: | ||
|
|
||
| ```shell | ||
| echo $(( $(date --date '2004-05-06 15:02:01Z' +%s%3N) << 18 )) | ||
| ``` | ||
|
|
||
| > **Note:** | ||
| > | ||
| > If you are a macOS user, you need to install `coreutils` via Homebrew and use `gdate` instead of `date`. | ||
| > | ||
| > ```shell | ||
| > echo $(( $(gdate --date '2004-05-06 15:02:01Z' +%s%3N) << 18 )) | ||
| > ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.