diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000000..15d4a0f81742 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Ask TiDB User Group Forum (Chinese) + url: https://asktug.com/ + about: Ask a question on the TiDB user group (Chinese). diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 200b4d3210c7..5cf166b04d6a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -19,10 +19,10 @@ By default, **CHOOSE MASTER ONLY** so your changes will be applied to the next T For details, see [tips for choosing the affected versions (in Chinese)](https://github.com/pingcap/docs-cn/blob/master/CONTRIBUTING.md#版本选择指南). - [ ] master (the latest development version) +- [ ] v7.1 (TiDB 7.1 versions) - [ ] v7.0 (TiDB 7.0 versions) - [ ] v6.6 (TiDB 6.6 versions) - [ ] v6.5 (TiDB 6.5 versions) -- [ ] v6.4 (TiDB 6.4 versions) - [ ] v6.1 (TiDB 6.1 versions) - [ ] v5.4 (TiDB 5.4 versions) - [ ] v5.3 (TiDB 5.3 versions) diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index f1e0da3c7d33..e19a11e87a1b 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -17,7 +17,7 @@ jobs: id: extract shell: bash run: | - echo "::set-output name=sha::$(sha=${{ github.sha }}; echo ${sha:0:6})" + echo "sha=$(sha=${{ github.sha }}; echo ${sha:0:6})" >> $GITHUB_OUTPUT - name: trigger docs-staging workflow run: | diff --git a/.github/workflows/link-fail-fast.yaml b/.github/workflows/link-fail-fast.yaml index 5168798c3a58..070286920b9a 100644 --- a/.github/workflows/link-fail-fast.yaml +++ b/.github/workflows/link-fail-fast.yaml @@ -15,7 +15,7 @@ jobs: id: changed-files run: | CHANGED_FILES=$(git diff-tree --name-only --diff-filter 'AM' -r HEAD^1 HEAD -- "*.md" | sed -z "s/\n$//;s/\n/' '/g") - echo "::set-output name=all_changed_files::${CHANGED_FILES}" + echo "all_changed_files=${CHANGED_FILES}" >> $GITHUB_OUTPUT - name: Download Exclude Path run: | diff --git a/.github/workflows/link.yaml b/.github/workflows/link.yaml index 0de3b9e62f83..34a6aef94e40 100644 --- a/.github/workflows/link.yaml +++ b/.github/workflows/link.yaml @@ -26,11 +26,10 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Create Issue From File - uses: peter-evans/create-issue-from-file@v3 + uses: peter-evans/create-issue-from-file@v4 with: title: Broken Link Detected content-filepath: out.md - assignees: TomShawn # - name: Fail if there were link errors # run: exit ${{ steps.lychee.outputs.exit_code }} diff --git a/LICENSE b/LICENSE index 8dada3edaf50..fd767ba662af 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,401 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Attribution-ShareAlike 3.0 Unported + +======================================================================= + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE +LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN +ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS +INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES +REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES +RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS +CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS +PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK +OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS +PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND +AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS +LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE +RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS +AND CONDITIONS. + +1. Definitions + + a. "Adaptation" means a work based upon the Work, or upon the Work + and other pre-existing works, such as a translation, adaptation, + derivative work, arrangement of music or other alterations of a + literary or artistic work, or phonogram or performance and includes + cinematographic adaptations or any other form in which the Work may + be recast, transformed, or adapted including in any form + recognizably derived from the original, except that a work that + constitutes a Collection will not be considered an Adaptation for + the purpose of this License. For the avoidance of doubt, where the + Work is a musical work, performance or phonogram, the + synchronization of the Work in timed-relation with a moving image + ("synching") will be considered an Adaptation for the purpose of + this License. + + b. "Collection" means a collection of literary or artistic works, + such as encyclopedias and anthologies, or performances, phonograms + or broadcasts, or other works or subject matter other than works + listed in Section 1(f) below, which, by reason of the selection and + arrangement of their contents, constitute intellectual creations, + in which the Work is included in its entirety in unmodified form + along with one or more other contributions, each constituting + separate and independent works in themselves, which together are + assembled into a collective whole. A work that constitutes a + Collection will not be considered an Adaptation (as defined below) + for the purposes of this License. + + c. "Creative Commons Compatible License" means a license that is + listed at https://creativecommons.org/compatiblelicenses that has + been approved by Creative Commons as being essentially equivalent + to this License, including, at a minimum, because that license: (i) + contains terms that have the same purpose, meaning and effect as + the License Elements of this License; and, (ii) explicitly permits + the relicensing of adaptations of works made available under that + license under this License or a Creative Commons jurisdiction + license with the same License Elements as this License. + + d. "Distribute" means to make available to the public the original + and copies of the Work or Adaptation, as appropriate, through sale + or other transfer of ownership. + + e. "License Elements" means the following high-level license + attributes as selected by Licensor and indicated in the title of + this License: Attribution, ShareAlike. + + f. "Licensor" means the individual, individuals, entity or entities + that offer(s) the Work under the terms of this License. + + g. "Original Author" means, in the case of a literary or artistic + work, the individual, individuals, entity or entities who created + the Work or if no individual or entity can be identified, the + publisher; and in addition (i) in the case of a performance the + actors, singers, musicians, dancers, and other persons who act, + sing, deliver, declaim, play in, interpret or otherwise perform + literary or artistic works or expressions of folklore; (ii) in the + case of a phonogram the producer being the person or legal entity + who first fixes the sounds of a performance or other sounds; and, + (iii) in the case of broadcasts, the organization that transmits + the broadcast. + + h. "Work" means the literary and/or artistic work offered under the + terms of this License including without limitation any production + in the literary, scientific and artistic domain, whatever may be + the mode or form of its expression including digital form, such as + a book, pamphlet and other writing; a lecture, address, sermon or + other work of the same nature; a dramatic or dramatico-musical + work; a choreographic work or entertainment in dumb show; a musical + composition with or without words; a cinematographic work to which + are assimilated works expressed by a process analogous to + cinematography; a work of drawing, painting, architecture, + sculpture, engraving or lithography; a photographic work to which + are assimilated works expressed by a process analogous to + photography; a work of applied art; an illustration, map, plan, + sketch or three-dimensional work relative to geography, topography, + architecture or science; a performance; a broadcast; a phonogram; a + compilation of data to the extent it is protected as a + copyrightable work; or a work performed by a variety or circus + performer to the extent it is not otherwise considered a literary + or artistic work. + + i. "You" means an individual or entity exercising rights under this + License who has not previously violated the terms of this License + with respect to the Work, or who has received express permission + from the Licensor to exercise rights under this License despite a + previous violation. + + j. "Publicly Perform" means to perform public recitations of the + Work and to communicate to the public those public recitations, by + any means or process, including by wire or wireless means or public + digital performances; to make available to the public Works in such + a way that members of the public may access these Works from a + place and at a place individually chosen by them; to perform the + Work to the public by any means or process and the communication to + the public of the performances of the Work, including by public + digital performance; to broadcast and rebroadcast the Work by any + means including signs, sounds or images. + k. "Reproduce" means to make copies of the Work by any means + including without limitation by sound or visual recordings and the + right of fixation and reproducing fixations of the Work, including + storage of a protected performance or phonogram in digital form or + other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, +limit, or restrict any uses free from copyright or rights arising from +limitations or exceptions that are provided for in connection with the +copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, +Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +perpetual (for the duration of the applicable copyright) license to +exercise the rights in the Work as stated below: + + a. to Reproduce the Work, to incorporate the Work into one or more + Collections, and to Reproduce the Work as incorporated in the + Collections; + + b. to create and Reproduce Adaptations provided that any such + Adaptation, including any translation in any medium, takes + reasonable steps to clearly label, demarcate or otherwise identify + that changes were made to the original Work. For example, a + translation could be marked "The original work was translated from + English to Spanish," or a modification could indicate "The original + work has been modified."; + + c. to Distribute and Publicly Perform the Work including as + incorporated in Collections; and, + + d. to Distribute and Publicly Perform Adaptations. + + e. For the avoidance of doubt: + + i. Non-waivable Compulsory License Schemes. In those + jurisdictions in which the right to collect royalties through + any statutory or compulsory licensing scheme cannot be waived, + the Licensor reserves the exclusive right to collect such + royalties for any exercise by You of the rights granted under + this License; + + ii. Waivable Compulsory License Schemes. In those jurisdictions + in which the right to collect royalties through any statutory or + compulsory licensing scheme can be waived, the Licensor waives + the exclusive right to collect such royalties for any exercise + by You of the rights granted under this License; and, + + iii. Voluntary License Schemes. The Licensor waives the right to + collect royalties, whether individually or, in the event that + the Licensor is a member of a collecting society that + administers voluntary licensing schemes, via that society, from + any exercise by You of the rights granted under this License. + + The above rights may be exercised in all media and formats whether + now known or hereafter devised. The above rights include the right + to make such modifications as are technically necessary to exercise + the rights in other media and formats. Subject to Section 8(f), all + rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly +made subject to and limited by the following restrictions: + + a. You may Distribute or Publicly Perform the Work only under the + terms of this License. You must include a copy of, or the Uniform + Resource Identifier (URI) for, this License with every copy of the + Work You Distribute or Publicly Perform. You may not offer or + impose any terms on the Work that restrict the terms of this + License or the ability of the recipient of the Work to exercise the + rights granted to that recipient under the terms of the License. + You may not sublicense the Work. You must keep intact all notices + that refer to this License and to the disclaimer of warranties with + every copy of the Work You Distribute or Publicly Perform. When You + Distribute or Publicly Perform the Work, You may not impose any + effective technological measures on the Work that restrict the + ability of a recipient of the Work from You to exercise the rights + granted to that recipient under the terms of the License. This + Section 4(a) applies to the Work as incorporated in a Collection, + but this does not require the Collection apart from the Work itself + to be made subject to the terms of this License. If You create a + Collection, upon notice from any Licensor You must, to the extent + practicable, remove from the Collection any credit as required by + Section 4(c), as requested. If You create an Adaptation, upon + notice from any Licensor You must, to the extent practicable, + remove from the Adaptation any credit as required by Section 4(c), + as requested. + + b. You may Distribute or Publicly Perform an Adaptation only under + the terms of: (i) this License; (ii) a later version of this + License with the same License Elements as this License; (iii) a + Creative Commons jurisdiction license (either this or a later + license version) that contains the same License Elements as this + License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative + Commons Compatible License. If you license the Adaptation under one + of the licenses mentioned in (iv), you must comply with the terms + of that license. If you license the Adaptation under the terms of + any of the licenses mentioned in (i), (ii) or (iii) (the + "Applicable License"), you must comply with the terms of the + Applicable License generally and the following provisions: (I) You + must include a copy of, or the URI for, the Applicable License with + every copy of each Adaptation You Distribute or Publicly Perform; + (II) You may not offer or impose any terms on the Adaptation that + restrict the terms of the Applicable License or the ability of the + recipient of the Adaptation to exercise the rights granted to that + recipient under the terms of the Applicable License; (III) You must + keep intact all notices that refer to the Applicable License and to + the disclaimer of warranties with every copy of the Work as + included in the Adaptation You Distribute or Publicly Perform; (IV) + when You Distribute or Publicly Perform the Adaptation, You may not + impose any effective technological measures on the Adaptation that + restrict the ability of a recipient of the Adaptation from You to + exercise the rights granted to that recipient under the terms of + the Applicable License. This Section 4(b) applies to the Adaptation + as incorporated in a Collection, but this does not require the + Collection apart from the Adaptation itself to be made subject to + the terms of the Applicable License. + + c. If You Distribute, or Publicly Perform the Work or any + Adaptations or Collections, You must, unless a request has been + made pursuant to Section 4(a), keep intact all copyright notices + for the Work and provide, reasonable to the medium or means You are + utilizing: (i) the name of the Original Author (or pseudonym, if + applicable) if supplied, and/or if the Original Author and/or + Licensor designate another party or parties (e.g., a sponsor + institute, publishing entity, journal) for attribution + ("Attribution Parties") in Licensor's copyright notice, terms of + service or by other reasonable means, the name of such party or + parties; (ii) the title of the Work if supplied; (iii) to the + extent reasonably practicable, the URI, if any, that Licensor + specifies to be associated with the Work, unless such URI does not + refer to the copyright notice or licensing information for the + Work; and (iv) , consistent with Ssection 3(b), in the case of an + Adaptation, a credit identifying the use of the Work in the + Adaptation (e.g., "French translation of the Work by Original + Author," or "Screenplay based on original Work by Original + Author"). The credit required by this Section 4(c) may be + implemented in any reasonable manner; provided, however, that in + the case of a Adaptation or Collection, at a minimum such credit + will appear, if a credit for all contributing authors of the + Adaptation or Collection appears, then as part of these credits and + in a manner at least as prominent as the credits for the other + contributing authors. For the avoidance of doubt, You may only use + the credit required by this Section for the purpose of attribution + in the manner set out above and, by exercising Your rights under + this License, You may not implicitly or explicitly assert or imply + any connection with, sponsorship or endorsement by the Original + Author, Licensor and/or Attribution Parties, as appropriate, of You + or Your use of the Work, without the separate, express prior + written permission of the Original Author, Licensor and/or + Attribution Parties. + + d. Except as otherwise agreed in writing by the Licensor or as may + be otherwise permitted by applicable law, if You Reproduce, + Distribute or Publicly Perform the Work either by itself or as part + of any Adaptations or Collections, You must not distort, mutilate, + modify or take other derogatory action in relation to the Work + which would be prejudicial to the Original Author's honor or + reputation. Licensor agrees that in those jurisdictions (e.g. + Japan), in which any exercise of the right granted in Section 3(b) + of this License (the right to make Adaptations) would be deemed to + be a distortion, mutilation, modification or other derogatory + action prejudicial to the Original Author's honor and reputation, + the Licensor will waive or not assert, as appropriate, this + Section, to the fullest extent permitted by the applicable national + law, to enable You to reasonably exercise Your right under Section + 3(b) of this License (right to make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + + UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, + LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR + WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, + STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES + OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, + NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT + DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF + IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. + + EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL + LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING + OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS + BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. This License and the rights granted hereunder will terminate + automatically upon any breach by You of the terms of this License. + Individuals or entities who have received Adaptations or + Collections from You under this License, however, will not have + their licenses terminated provided such individuals or entities + remain in full compliance with those licenses. Sections 1, 2, 5, 6, + 7, and 8 will survive any termination of this License. + + b. Subject to the above terms and conditions, the license granted + here is perpetual (for the duration of the applicable copyright in + the Work). Notwithstanding the above, Licensor reserves the right + to release the Work under different license terms or to stop + distributing the Work at any time; provided, however that any such + election will not serve to withdraw this License (or any other + license that has been, or is required to be, granted under the + terms of this License), and this License will continue in full + force and effect unless terminated as stated above. + +8. Miscellaneous + + a. Each time You Distribute or Publicly Perform the Work or a + Collection, the Licensor offers to the recipient a license to the + Work on the same terms and conditions as the license granted to You + under this License. + + b. Each time You Distribute or Publicly Perform an Adaptation, + Licensor offers to the recipient a license to the original Work on + the same terms and conditions as the license granted to You under + this License. + + c. If any provision of this License is invalid or unenforceable + under applicable law, it shall not affect the validity or + enforceability of the remainder of the terms of this License, and + without further action by the parties to this agreement, such + provision shall be reformed to the minimum extent necessary to make + such provision valid and enforceable. + + d. No term or provision of this License shall be deemed waived and + no breach consented to unless such waiver or consent shall be in + writing and signed by the party to be charged with such waiver or + consent. + + e. This License constitutes the entire agreement between the + parties with respect to the Work licensed here. There are no + understandings, agreements or representations with respect to the + Work not specified here. Licensor shall not be bound by any + additional provisions that may appear in any communication from + You. This License may not be modified without the mutual written + agreement of the Licensor and You. + + f. The rights granted under, and the subject matter referenced, in + this License were drafted utilizing the terminology of the Berne + Convention for the Protection of Literary and Artistic Works (as + amended on September 28, 1979), the Rome Convention of 1961, the + WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms + Treaty of 1996 and the Universal Copyright Convention (as revised + on July 24, 1971). These rights and subject matter take effect in + the relevant jurisdiction in which the License terms are sought to + be enforced according to the corresponding provisions of the + implementation of those treaty provisions in the applicable + national law. If the standard suite of rights granted under + applicable copyright law includes additional rights not granted + under this License, such additional rights are deemed to be + included in the License; this License is not intended to restrict + the license of any rights under applicable law. + +======================================================================= + +Creative Commons Notice + +Creative Commons is not a party to this License, and makes no warranty +whatsoever in connection with the Work. Creative Commons will not be +liable to You or any party on any legal theory for any damages +whatsoever, including without limitation any general, special, +incidental or consequential damages arising in connection to this +license. Notwithstanding the foregoing two (2) sentences, if Creative +Commons has expressly identified itself as the Licensor hereunder, it +shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the +Work is licensed under the CCPL, Creative Commons does not authorize +the use by either party of the trademark "Creative Commons" or any +related trademark or logo of Creative Commons without the prior written +consent of Creative Commons. Any permitted use will be in compliance +with Creative Commons' then-current trademark usage guidelines, as may +be published on its website or otherwise made available upon request +from time to time. For the avoidance of doubt, this trademark +restriction does not form part of the License. + +Creative Commons may be contacted at https://creativecommons.org/. diff --git a/README.md b/README.md index 300eabe64c25..d5e1b71d434c 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ | 文档仓库 branch | 对应 TiDB 文档版本 | |:---------|:----------| | [`master`](https://github.com/pingcap/docs-cn/tree/master) | dev 最新开发版 | +| [`release-7.0`](https://github.com/pingcap/docs-cn/tree/release-7.0) | 7.0 开发里程碑版 (DMR) | +| [`release-6.6`](https://github.com/pingcap/docs-cn/tree/release-6.6) | 6.6 开发里程碑版 (DMR) | +| [`release-6.5`](https://github.com/pingcap/docs-cn/tree/release-6.5) | 6.5 长期支持版 (LTS) | +| [`release-6.4`](https://github.com/pingcap/docs-cn/tree/release-6.4) | 6.4 开发里程碑版 (DMR) | | [`release-6.3`](https://github.com/pingcap/docs-cn/tree/release-6.3) | 6.3 开发里程碑版 (DMR) | | [`release-6.2`](https://github.com/pingcap/docs-cn/tree/release-6.2) | 6.2 开发里程碑版 (DMR) | | [`release-6.1`](https://github.com/pingcap/docs-cn/tree/release-6.1) | 6.1 长期支持版 (LTS) | @@ -36,3 +40,7 @@ ## 贡献者数量增长图 [![Contributor over time](https://contributor-graph-api.apiseven.com/contributors-svg?chart=contributorOverTime&repo=pingcap/docs-cn)](https://www.apiseven.com/en/contributor-graph?chart=contributorOverTime&repo=pingcap/docs-cn) + +## License + +自 TiDB v7.0 起,所有文档的许可证均为 [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)。 diff --git a/TOC.md b/TOC.md index c02e0278ad7c..0f9e051ce03a 100644 --- a/TOC.md +++ b/TOC.md @@ -4,7 +4,7 @@ - [文档中心](https://docs.pingcap.com/zh) - 关于 TiDB - [TiDB 简介](/overview.md) - - [TiDB 6.6 Release Notes](/releases/release-6.6.0.md) + - [TiDB 7.0 Release Notes](/releases/release-7.0.0.md) - [功能概览](/basic-features.md) - [与 MySQL 的兼容性](/mysql-compatibility.md) - [使用限制](/tidb-limitations.md) @@ -984,6 +984,8 @@ - [版本发布时间线](/releases/release-timeline.md) - [TiDB 版本规则](/releases/versioning.md) - [TiDB 离线包](/binary-package.md) + - v7.0 + - [7.0.0-DMR](/releases/release-7.0.0.md) - v6.6 - [6.6.0-DMR](/releases/release-6.6.0.md) - v6.5 diff --git a/basic-features.md b/basic-features.md index 75779099707e..0d85bdf23054 100644 --- a/basic-features.md +++ b/basic-features.md @@ -20,212 +20,218 @@ aliases: ['/docs-cn/dev/basic-features/','/docs-cn/dev/experimental-features-4.0 ## 数据类型,函数和操作符 -| 数据类型,函数,操作符 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| ---------------------------------------------------------------------------------- | :------:| :------- | :------: | :------: | :------: | :------: | :------: | :------: | :------: | -| [数值类型](/data-type-numeric.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [日期和时间类型](/data-type-date-and-time.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [字符串类型](/data-type-string.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [JSON 类型](/data-type-json.md) | Y | Y | E | E | E | E | E | E | E | -| [控制流程函数](/functions-and-operators/control-flow-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [字符串函数](/functions-and-operators/string-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [数值函数与操作符](/functions-and-operators/numeric-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [日期和时间函数](/functions-and-operators/date-and-time-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [位函数和操作符](/functions-and-operators/bit-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Cast 函数和操作符](/functions-and-operators/cast-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [加密和压缩函数](/functions-and-operators/encryption-and-compression-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [信息函数](/functions-and-operators/information-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [JSON 函数](/functions-and-operators/json-functions.md) | Y | Y | E | E | E | E | E | E | E | -| [聚合函数](/functions-and-operators/aggregate-group-by-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [窗口函数](/functions-and-operators/window-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [其他函数](/functions-and-operators/miscellaneous-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [操作符](/functions-and-operators/operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [字符集和排序规则](/character-set-and-collation.md) [^1] | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [用户级别锁](/functions-and-operators/locking-functions.md) | Y | Y | Y | N | N | N | N | N | N | +| 数据类型,函数,操作符 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|:---:|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| [数值类型](/data-type-numeric.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [日期和时间类型](/data-type-date-and-time.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [字符串类型](/data-type-string.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [JSON 类型](/data-type-json.md) | Y | Y | Y | E | E | E | E | E | E | E | +| [控制流程函数](/functions-and-operators/control-flow-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [字符串函数](/functions-and-operators/string-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [数值函数与操作符](/functions-and-operators/numeric-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [日期和时间函数](/functions-and-operators/date-and-time-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [位函数和操作符](/functions-and-operators/bit-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Cast 函数和操作符](/functions-and-operators/cast-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [加密和压缩函数](/functions-and-operators/encryption-and-compression-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [信息函数](/functions-and-operators/information-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [JSON 函数](/functions-and-operators/json-functions.md) | Y | Y | Y | E | E | E | E | E | E | E | +| [聚合函数](/functions-and-operators/aggregate-group-by-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [窗口函数](/functions-and-operators/window-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [其他函数](/functions-and-operators/miscellaneous-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [操作符](/functions-and-operators/operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [字符集和排序规则](/character-set-and-collation.md) [^1] | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [用户级别锁](/functions-and-operators/locking-functions.md) | Y | Y | Y | Y | N | N | N | N | N | N | ## 索引和约束 -| 索引和约束 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| ---------------------------------------------------------------------- | --- | --- | --- | :------: | :------: | :------: | :------: | :------: | :------: | :------: | -| [表达式索引](/sql-statements/sql-statement-create-index.md#表达式索引) [^2] | Y | Y | Y | E | E | E | E | E | E | E | -| [列式存储 (TiFlash)](/tiflash/tiflash-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| 索引和约束 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| [表达式索引](/sql-statements/sql-statement-create-index.md#表达式索引) [^2] | Y | Y | Y | E | E | E | E | E | E | E | +| [列式存储 (TiFlash)](/tiflash/tiflash-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | [使用 FastScan 加速 OLAP 场景下的查询](/tiflash/use-fastscan.md) | Y | E | E | N | N | N | N | N | N | N | -| [RocksDB 引擎](/storage-engine/rocksdb-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Titan 插件](/storage-engine/titan-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Titan Level Merge](/storage-engine/titan-configuration.md#level-merge实验功能) | E | E | E | E | E | E | E | E | E | E | +| [RocksDB 引擎](/storage-engine/rocksdb-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Titan 插件](/storage-engine/titan-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Titan Level Merge](/storage-engine/titan-configuration.md#level-merge实验功能) | E | E | E | E | E | E | E | E | E | E | | [使用 bucket 提高数据扫描并发度](/tune-region-performance.md#使用-bucket-增加并发) | E | E | E | E | N | N | N | N | N | N | -| [不可见索引](/sql-statements/sql-statement-add-index.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | -| [复合主键](/constraints.md#主键约束) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [唯一约束](/constraints.md#唯一约束) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [整型主键上的聚簇索引](/constraints.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [复合或非整型主键上的聚簇索引](/constraints.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | -| [多值索引](/sql-statements/sql-statement-create-index.md#多值索引) | E | E | N | N | N | N | N | N | N | -| [外键约束](/constraints.md#外键约束) | Y | Y | N | N | N | N | N | N | N | +| [不可见索引](/sql-statements/sql-statement-add-index.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | +| [复合主键](/constraints.md#主键约束) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [唯一约束](/constraints.md#唯一约束) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [整型主键上的聚簇索引](/constraints.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [复合或非整型主键上的聚簇索引](/constraints.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | +| [多值索引](/sql-statements/sql-statement-create-index.md#多值索引) | E | E | N | N | N | N | N | N | N | N | +| [外键约束](/constraints.md#外键约束) | Y | Y | N | N | N | N | N | N | N | N | +| [TiFlash 延迟物化](/tiflash/tiflash-late-materialization.md) | E | N | N | N | N | N | N | N | N | N | ## SQL 语句 -| SQL 语句 [^3] | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| --------------------------------------------------------------------------- | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | -| `SELECT`,`INSERT`,`UPDATE`,`DELETE`,`REPLACE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| `INSERT ON DUPLICATE KEY UPDATE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| `LOAD DATA INFILE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| `SELECT INTO OUTFILE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| `INNER JOIN`, LEFT\|RIGHT [OUTER] JOIN | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| `UNION`,`UNION ALL` | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [`EXCEPT` 和 `INTERSECT` 运算符](/functions-and-operators/set-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | N | -| `GROUP BY`,`ORDER BY` | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [窗口函数](/functions-and-operators/window-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [公共表表达式 (CTE)](/sql-statements/sql-statement-with.md) | Y | Y | Y | Y | Y | Y | Y | N | N | -| `START TRANSACTION`,`COMMIT`,`ROLLBACK` | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [`EXPLAIN`](/sql-statements/sql-statement-explain.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [`EXPLAIN ANALYZE`](/sql-statements/sql-statement-explain-analyze.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [用户自定义变量](/user-defined-variables.md) | E | E | E | E | E | E | E | E | E | -| [`BATCH [ON COLUMN] LIMIT INTEGER DELETE`](/sql-statements/sql-statement-batch.md) | Y | Y | Y | N | N | N | N | N | N | -| [`BATCH [ON COLUMN] LIMIT INTEGER INSERT/UPDATE/REPLACE`](/sql-statements/sql-statement-batch.md) | Y | Y | N | N | N | N | N | N | N | -| [`ALTER TABLE ... COMPACT`](/sql-statements/sql-statement-alter-table-compact.md) | Y | Y | E | N | N | N | N | N | N | -| [表级锁 (Table Lock)](/sql-statements/sql-statement-lock-tables-and-unlock-tables.md) | E | E | E | E | E | E | E | E | E | -| [物化列式存储的查询结果](/tiflash/tiflash-results-materialization.md) | E | E | N | N | N | N | N | N | N | +| SQL 语句 [^3] | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| `SELECT`,`INSERT`,`UPDATE`,`DELETE`,`REPLACE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| `INSERT ON DUPLICATE KEY UPDATE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| `LOAD DATA INFILE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| `SELECT INTO OUTFILE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| `INNER JOIN`, LEFT\|RIGHT [OUTER] JOIN | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| `UNION`,`UNION ALL` | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [`EXCEPT` 和 `INTERSECT` 运算符](/functions-and-operators/set-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | +| `GROUP BY`,`ORDER BY` | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [窗口函数](/functions-and-operators/window-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [公共表表达式 (CTE)](/sql-statements/sql-statement-with.md) | Y | Y | Y | Y | Y | Y | Y | Y | N | N | +| `START TRANSACTION`,`COMMIT`,`ROLLBACK` | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [`EXPLAIN`](/sql-statements/sql-statement-explain.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [`EXPLAIN ANALYZE`](/sql-statements/sql-statement-explain-analyze.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [用户自定义变量](/user-defined-variables.md) | E | E | E | E | E | E | E | E | E | E | +| [`BATCH [ON COLUMN] LIMIT INTEGER DELETE`](/sql-statements/sql-statement-batch.md) | Y | Y | Y | Y | N | N | N | N | N | N | +| [`BATCH [ON COLUMN] LIMIT INTEGER INSERT/UPDATE/REPLACE`](/sql-statements/sql-statement-batch.md) | Y | Y | Y | N | N | N | N | N | N | N | +| [`ALTER TABLE ... COMPACT`](/sql-statements/sql-statement-alter-table-compact.md) | Y | Y | Y | E | N | N | N | N | N | N | +| [表级锁 (Table Lock)](/sql-statements/sql-statement-lock-tables-and-unlock-tables.md) | E | E | E | E | E | E | E | E | E | E | +| [物化列式存储的查询结果](/tiflash/tiflash-results-materialization.md) | E | E | E | N | N | N | N | N | N | N | ## 高级 SQL 功能 -| 高级 SQL 功能 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| ------------------------------------------------------------------- | :------: | :------: | :------: | :------: | :------: | :------: | :------: | -------- | :------: | -| [执行计划缓存](/sql-prepared-plan-cache.md) | Y | Y | Y | Y | Y | E | E | E | E | -| [执行计划管理 (SPM)](/sql-plan-management.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [根据历史执行计划创建绑定](/sql-plan-management.md#根据历史执行计划创建绑定) | E | E | N | N | N | N | N | N | N | -| [下推计算结果缓存 (Coprocessor Cache)](/coprocessor-cache.md) | Y | Y | Y | Y | Y | Y | Y | Y | E | -| [Stale Read](/stale-read.md) | Y | Y | Y | Y | Y | Y | Y | N | N | -| [Follower Read](/follower-read.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [通过系统变量 `tidb_snapshot` 读取历史数据](/read-historical-data.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Optimizer hints](/optimizer-hints.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [MPP 执行引擎](/explain-mpp.md) | Y | Y | Y | Y | Y | Y | Y | Y | N | -| [MPP 执行引擎 - compression exchange](/explain-mpp.md#mpp-version-和-exchange-数据压缩) | Y | N | N | N | N | N | N | N | N | -| [索引合并](/explain-index-merge.md) | Y | Y | Y | Y | E | E | E | E | E | -| [基于 SQL 的数据放置规则](/placement-rules-in-sql.md) | Y | Y | Y | E | E | N | N | N | N | -| [Cascades Planner](/system-variables.md#tidb_enable_cascades_planner) | E | E | E | E | E | E | E | E | E | +| 高级 SQL 功能 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|---|:---:| +| [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md) | Y | Y | Y | Y | Y | Y | E | E | E | E | +| [非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md) | E | N | N | N | N | N | N | N | N | N | +| [执行计划管理 (SPM)](/sql-plan-management.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [根据历史执行计划创建绑定](/sql-plan-management.md#根据历史执行计划创建绑定) | Y | Y | E | N | N | N | N | N | N | N | +| [下推计算结果缓存 (Coprocessor Cache)](/coprocessor-cache.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | E | +| [Stale Read](/stale-read.md) | Y | Y | Y | Y | Y | Y | Y | Y | N | N | +| [Follower Read](/follower-read.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [通过系统变量 `tidb_snapshot` 读取历史数据](/read-historical-data.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Optimizer hints](/optimizer-hints.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [MPP 执行引擎](/explain-mpp.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | +| [MPP 执行引擎 - compression exchange](/explain-mpp.md#mpp-version-和-exchange-数据压缩) | Y | Y | N | N | N | N | N | N | N | N | +| [索引合并](/explain-index-merge.md) | Y | Y | Y | Y | Y | E | E | E | E | E | +| [基于 SQL 的数据放置规则](/placement-rules-in-sql.md) | Y | Y | Y | Y | E | E | N | N | N | N | +| [Cascades Planner](/system-variables.md#tidb_enable_cascades_planner) | E | E | E | E | E | E | E | E | E | E | ## 数据定义语言 (DDL) -| 数据定义语言 (DDL) | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| ------------------------------------------------------------ | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | -| `CREATE`,`DROP`,`ALTER`,`RENAME`,`TRUNCATE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [生成列](/generated-columns.md) | E | E | E | E | E | E | E | E | E | -| [视图](/views.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [序列](/sql-statements/sql-statement-create-sequence.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [`AUTO_INCREMENT` 列](/auto-increment.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [`AUTO_RANDOM` 列](/auto-random.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [TTL (Time to Live)](/time-to-live.md) | E | E | N | N | N | N | N | N | N | -| [DDL 算法断言](/sql-statements/sql-statement-alter-table.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| 在单条语句中添加多列 | Y | Y | E | E | E | E | E | E | E | -| [更改列类型](/sql-statements/sql-statement-modify-column.md) | Y | Y | Y | Y | Y | Y | Y | N | N | -| [临时表](/temporary-tables.md) | Y | Y | Y | Y | Y | N | N | N | N | -| 并行 DDL | Y | Y | N | N | N | N | N | N | N | -| [添加索引加速](/system-variables.md#tidb_ddl_enable_fast_reorg-从-v630-版本开始引入) | Y | Y | N | N | N | N | N | N | N | -| [元数据锁](/metadata-lock.md) | Y | Y | N | N | N | N | N | N | N | -| [`FLASHBACK CLUSTER TO TIMESTAMP`](/sql-statements/sql-statement-flashback-to-timestamp.md) | Y | Y | N | N | N | N | N | N | N | +| 数据定义语言 (DDL) | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| `CREATE`,`DROP`,`ALTER`,`RENAME`,`TRUNCATE` | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [生成列](/generated-columns.md) | E | E | E | E | E | E | E | E | E | E | +| [视图](/views.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [序列](/sql-statements/sql-statement-create-sequence.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [`AUTO_INCREMENT` 列](/auto-increment.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [`AUTO_RANDOM` 列](/auto-random.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [TTL (Time to Live)](/time-to-live.md) | Y | E | E | N | N | N | N | N | N | N | +| [DDL 算法断言](/sql-statements/sql-statement-alter-table.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| 在单条语句中添加多列 | Y | Y | Y | E | E | E | E | E | E | E | +| [更改列类型](/sql-statements/sql-statement-modify-column.md) | Y | Y | Y | Y | Y | Y | Y | Y | N | N | +| [临时表](/temporary-tables.md) | Y | Y | Y | Y | Y | Y | N | N | N | N | +| 并行 DDL | Y | Y | Y | N | N | N | N | N | N | N | +| [添加索引加速](/system-variables.md#tidb_ddl_enable_fast_reorg-从-v630-版本开始引入) | Y | Y | Y | N | N | N | N | N | N | N | +| [元数据锁](/metadata-lock.md) | Y | Y | Y | N | N | N | N | N | N | N | +| [`FLASHBACK CLUSTER TO TIMESTAMP`](/sql-statements/sql-statement-flashback-to-timestamp.md) | Y | Y | Y | N | N | N | N | N | N | N | ## 事务 -| 事务 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| ------------------------------------------------------------ | ---- | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | -| [Async commit](/system-variables.md#tidb_enable_async_commit-从-v50-版本开始引入) | Y | Y | Y | Y | Y | Y | Y | Y | N | -| [1PC](/system-variables.md#tidb_enable_1pc-从-v50-版本开始引入) | Y | Y | Y | Y | Y | Y | Y | Y | N | -| [大事务 (10 GB)](/transaction-overview.md#事务限制) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [悲观事务](/pessimistic-transaction.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [乐观事务](/optimistic-transaction.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [可重复读隔离(快照隔离)](/transaction-isolation-levels.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [读已提交隔离](/transaction-isolation-levels.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| 事务 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| [Async commit](/system-variables.md#tidb_enable_async_commit-从-v50-版本开始引入) | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | +| [1PC](/system-variables.md#tidb_enable_1pc-从-v50-版本开始引入) | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | +| [大事务 (10 GB)](/transaction-overview.md#事务限制) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [悲观事务](/pessimistic-transaction.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [乐观事务](/optimistic-transaction.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [可重复读隔离(快照隔离)](/transaction-isolation-levels.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [读已提交隔离](/transaction-isolation-levels.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | ## 分区 -| 分区 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| ------------------------------------------------------------ | :--: | :--: | ------------ | :----------: | :----------: | :----------: | :----------: | :-----: | :-----: | -| [Range 分区](/partitioned-table.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Hash 分区](/partitioned-table.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [List 分区](/partitioned-table.md) | Y | Y | Y | E | E | E | E | E | N | -| [List COLUMNS 分区](/partitioned-table.md) | Y | Y | Y | E | E | E | E | E | N | -| [`EXCHANGE PARTITION`](/partitioned-table.md) | Y | Y | E | E | E | E | E | E | N | -| [动态裁剪](/partitioned-table.md#动态裁剪模式) | Y | Y | Y | E | E | E | E | N | N | -| [Range COLUMNS 分区](/partitioned-table.md#range-columns-分区) | Y | Y | N | N | N |N | N | N | N | -| [Range INTERVAL 分区](/partitioned-table.md#range-interval-分区) | E | E | N | N | N |N | N | N | N | +| 分区 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|:---:|:---:|---|:---:|:---:|:---:|:---:|:---:|:---:| +| [Range 分区](/partitioned-table.md#range-分区) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Hash 分区](/partitioned-table.md#hash-分区) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Key 分区](/partitioned-table.md#key-分区) | Y | N | N | N | N | N | N | N | N | N | +| [List 分区](/partitioned-table.md#list-分区) | Y | Y | Y | Y | E | E | E | E | E | N | +| [List COLUMNS 分区](/partitioned-table.md#list-columns-分区) | Y | Y | Y | Y | E | E | E | E | E | N | +| [`EXCHANGE PARTITION`](/partitioned-table.md) | Y | Y | Y | E | E | E | E | E | E | N | +| [`REORGANIZE PARTITION`](/partitioned-table.md#重组分区) | Y | N | N | N | N | N | N | N | N | N | +| [动态裁剪](/partitioned-table.md#动态裁剪模式) | Y | Y | Y | Y | E | E | E | E | N | N | +| [Range COLUMNS 分区](/partitioned-table.md#range-columns-分区) | Y | Y | Y | N | N | N | N | N | N | N | +| [Range INTERVAL 分区](/partitioned-table.md#range-interval-分区) | E | E | E | N | N | N | N | N | N | N | ## 统计信息 -| 统计信息 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| --------------------------------------------------------- | :------: | :------: | :------: | :------: | :------: | :------: | :------: | -------- | :------: | -| [CM-Sketch](/statistics.md) | 默认关闭 | 默认关闭 | 默认关闭 | 默认关闭 | 默认关闭 | Y | Y | Y | Y | -| [直方图](/statistics.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| 扩展统计信息(多列) | E | E | E | E | E | E | E | E | N | -| 统计反馈 | N | N | 已废弃 | 已废弃 | E | E | E | E | E | -| [统计信息自动更新](/statistics.md#自动更新) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [快速分析](/system-variables.md#tidb_enable_fast_analyze) | E | E | E | E | E | E | E | E | E | -| [动态裁剪](/partitioned-table.md#动态裁剪模式) | Y | Y | Y | E | E | E | E | N | N | -| [收集部分列的统计信息](/statistics.md#收集部分列的统计信息) | E | E | E | E | N | N | N | N | N | -| [限制统计信息的内存使用量](/statistics.md#统计信息收集的内存限制) | E | E | E | N | N | N | N | N | N | -| [随机采样约 10000 行数据来快速构建统计信息](/system-variables.md#tidb_enable_fast_analyze) | E | E | E | E | E | E | E | E | E | -| [锁定统计信息](/statistics.md#锁定统计信息) | E | E | N | N | N | N | N | N | N | +| 统计信息 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|---|:---:| +| [CM-Sketch](/statistics.md) | 默认关闭 | 默认关闭 | 默认关闭 | 默认关闭 | 默认关闭 | 默认关闭 | Y | Y | Y | Y | +| [直方图](/statistics.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| 扩展统计信息(多列) | E | E | E | E | E | E | E | E | E | N | +| 统计反馈 | N | N | N | 已废弃 | 已废弃 | E | E | E | E | E | +| [统计信息自动更新](/statistics.md#自动更新) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [快速分析](/system-variables.md#tidb_enable_fast_analyze) | E | E | E | E | E | E | E | E | E | E | +| [动态裁剪](/partitioned-table.md#动态裁剪模式) | Y | Y | Y | Y | E | E | E | E | N | N | +| [收集部分列的统计信息](/statistics.md#收集部分列的统计信息) | E | E | E | E | E | N | N | N | N | N | +| [限制统计信息的内存使用量](/statistics.md#统计信息收集的内存限制) | E | E | E | E | N | N | N | N | N | N | +| [随机采样约 10000 行数据来快速构建统计信息](/system-variables.md#tidb_enable_fast_analyze) | E | E | E | E | E | E | E | E | E | E | +| [锁定统计信息](/statistics.md#锁定统计信息) | E | E | E | N | N | N | N | N | N | N | ## 安全 -| 安全 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| ------------------------------------------------------------ | ---- | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | -| [传输层加密 (TLS)](/enable-tls-between-clients-and-servers.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [静态加密 (TDE)](/encryption-at-rest.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [基于角色的访问控制 (RBAC)](/role-based-access-control.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [证书鉴权](/certificate-authentication.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [`caching_sha2_password` 认证](/system-variables.md#default_authentication_plugin) | Y | Y | Y | Y | Y | Y | N | N | N | -| [`tidb_sm3_password` 认证](/system-variables.md#default_authentication_plugin) | Y | Y | N | N | N | N | N | N | N | -| [`tidb_auth_token` 认证](/system-variables.md#default_authentication_plugin) | Y | Y | N | N | N | N | N | N | N | -| [密码管理](/password-management.md) | Y | Y | N | N | N | N | N | N | N | -| [与 MySQL 兼容的 `GRANT` 权限管理](/privilege-management.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [动态权限](/privilege-management.md#动态权限) | Y | Y | Y | Y | Y | Y | Y | N | N | -| [安全增强模式](/system-variables.md#tidb_enable_enhanced_security) | Y | Y | Y | Y | Y | Y | Y | N | N | -| [日志脱敏](/log-redaction.md) | Y | Y | Y | Y | Y | Y | Y | Y | N | +| 安全 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| [传输层加密 (TLS)](/enable-tls-between-clients-and-servers.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [静态加密 (TDE)](/encryption-at-rest.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [基于角色的访问控制 (RBAC)](/role-based-access-control.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [证书鉴权](/certificate-authentication.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [`caching_sha2_password` 认证](/system-variables.md#default_authentication_plugin) | Y | Y | Y | Y | Y | Y | Y | N | N | N | +| [`tidb_sm3_password` 认证](/system-variables.md#default_authentication_plugin) | Y | Y | Y | N | N | N | N | N | N | N | +| [`tidb_auth_token` 认证](/system-variables.md#default_authentication_plugin) | Y | Y | Y | N | N | N | N | N | N | N | +| [密码管理](/password-management.md) | Y | Y | Y | N | N | N | N | N | N | N | +| [与 MySQL 兼容的 `GRANT` 权限管理](/privilege-management.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [动态权限](/privilege-management.md#动态权限) | Y | Y | Y | Y | Y | Y | Y | Y | N | N | +| [安全增强模式](/system-variables.md#tidb_enable_enhanced_security) | Y | Y | Y | Y | Y | Y | Y | Y | N | N | +| [日志脱敏](/log-redaction.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | ## 数据导入和导出 -| 数据导入和导出 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -| ----------------------------------------------------------------------- | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | -| [快速导入 (TiDB Lightning)](/tidb-lightning/tidb-lightning-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| mydumper 逻辑导出 | 已废弃 | 已废弃| 已废弃 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | -| [Dumpling 逻辑导出](/dumpling-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [事务 `LOAD DATA`](/sql-statements/sql-statement-load-data.md) | Y | Y | Y | Y | Y | Y | Y | Y | N [^5] | -| [数据迁移工具](/migration-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [TiDB Binlog](/tidb-binlog/tidb-binlog-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Change data capture (CDC)](/ticdc/ticdc-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [TiCDC 支持保存数据到存储服务 (S3/NFS/Azure Blob Storage)](/ticdc/ticdc-sink-to-cloud-storage.md) | E | E | N | N | N | N | N | N | N | -| [TiCDC 支持在两个 TiDB 集群之间进行双向复制](/ticdc/ticdc-bidirectional-replication.md) | Y | Y | N | N | N | N | N | N | N | +| 数据导入和导出 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| [快速导入 (TiDB Lightning)](/tidb-lightning/tidb-lightning-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| mydumper 逻辑导出 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | 已废弃 | +| [Dumpling 逻辑导出](/dumpling-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [事务 `LOAD DATA`](/sql-statements/sql-statement-load-data.md) | E [^5] | Y | Y | Y | Y | Y | Y | Y | Y | N [^6] | +| [数据迁移工具](/migration-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [TiDB Binlog](/tidb-binlog/tidb-binlog-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Change data capture (CDC)](/ticdc/ticdc-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [TiCDC 支持保存数据到存储服务 (S3/NFS/Azure Blob Storage/GCP)](/ticdc/ticdc-sink-to-cloud-storage.md) | Y | E | E | N | N | N | N | N | N | N | +| [TiCDC 支持在两个 TiDB 集群之间进行双向复制](/ticdc/ticdc-bidirectional-replication.md) | Y | Y | Y | N | N | N | N | N | N | N | +| [TiCDC OpenAPI v2](/ticdc/ticdc-open-api-v2.md) | Y | N | N | N | N | N | N | N | N | N | ## 管理,可视化和工具 -| 管理,可视化和工具 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | -|----------------------------------------------------------------------------| :------:| :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | -| [TiDB Dashboard 图形化展示](/dashboard/dashboard-intro.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [TiDB Dashboard 持续性能分析功能](/dashboard/continuous-profiling.md) | Y | Y | Y | E | E | N | N | N | N | -| [TiDB Dashboard Top SQL 功能](/dashboard/top-sql.md) | Y | Y | Y | E | N | N | N | N | N | -| [TiDB Dashboard SQL 诊断功能](/information-schema/information-schema-sql-diagnostics.md) | Y | Y | E | E | E | E | E | E | E | -| [TiDB Dashboard 集群诊断功能](/dashboard/dashboard-diagnostics-access.md) | Y | Y | E | E | E | E | E | E | E | -| [Grafana 中的 TiKV-FastTune 面板](/grafana-tikv-dashboard.md#tikv-fasttune-面板) | E | E | E | E | E | E | E | E | E | -| [Information schema](/information-schema/information-schema.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Metrics schema](/metrics-schema.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Statements summary tables](/statement-summary-tables.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Statements summary tables - 持久化 statements summary](/statement-summary-tables.md#持久化-statements-summary) | E | N | N | N | N | N | N | N | N | -| [慢查询日志](/identify-slow-queries.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [TiUP 部署](/tiup/tiup-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Kubernetes operator](https://docs.pingcap.com/tidb-in-kubernetes/stable) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [内置物理备份](/br/backup-and-restore-use-cases.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Global Kill](/sql-statements/sql-statement-kill.md) | Y | Y | Y | E | E | E | E | E | E | -| [Lock View](/information-schema/information-schema-data-lock-waits.md) | Y | Y | Y | Y | Y | Y | E | E | E | -| [`SHOW CONFIG`](/sql-statements/sql-statement-show-config.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [`SET CONFIG`](/dynamic-config.md) | Y | Y | Y | E | E | E | E | E | E | -| [DM WebUI](/dm/dm-webui-guide.md) | E | E | E | N | N | N | N | N | N | -| [前台限流](/tikv-configuration-file.md#前台限流) | Y | Y | E | N | N | N | N | N | N | -| [后台限流](/tikv-configuration-file.md#后台限流) | E | E | N | N | N | N | N | N | N | -| [基于 EBS 的备份和恢复](https://docs.pingcap.com/zh/tidb-in-kubernetes/v1.4/volume-snapshot-backup-restore) | Y | Y | N | N | N | N | N | N | N | -| [PITR](/br/br-pitr-guide.md) | Y | Y | N | N | N | N | N | N | N | -| [全局内存控制](/configure-memory-usage.md#如何配置-tidb-server-实例使用内存的阈值) | Y | Y | N | N | N | N | N | N | N | -| [RawKV 跨集群复制](/tikv-configuration-file.md#api-version-从-v610-版本开始引入) | E | E | N | N | N | N | N | N | N | -| [Green GC](/system-variables.md#tidb_gc_scan_lock_mode-从-v50-版本开始引入) | E | E | E | E | E | E | E | E | N | -| [资源管控 (Resource Control)](/tidb-resource-control.md) | E | N | N | N | N | N | N | N | N | +| 管理,可视化和工具 | 7.0 | 6.6 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | 5.0 | 4.0 | +|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| [TiDB Dashboard 图形化展示](/dashboard/dashboard-intro.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [TiDB Dashboard 持续性能分析功能](/dashboard/continuous-profiling.md) | Y | Y | Y | Y | E | E | N | N | N | N | +| [TiDB Dashboard Top SQL 功能](/dashboard/top-sql.md) | Y | Y | Y | Y | E | N | N | N | N | N | +| [TiDB Dashboard SQL 诊断功能](/information-schema/information-schema-sql-diagnostics.md) | Y | Y | Y | E | E | E | E | E | E | E | +| [TiDB Dashboard 集群诊断功能](/dashboard/dashboard-diagnostics-access.md) | Y | Y | Y | E | E | E | E | E | E | E | +| [Grafana 中的 TiKV-FastTune 面板](/grafana-tikv-dashboard.md#tikv-fasttune-面板) | E | E | E | E | E | E | E | E | E | E | +| [Information schema](/information-schema/information-schema.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Metrics schema](/metrics-schema.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Statements summary tables](/statement-summary-tables.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Statements summary tables - 持久化 statements summary](/statement-summary-tables.md#持久化-statements-summary) | E | E | N | N | N | N | N | N | N | N | +| [慢查询日志](/identify-slow-queries.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [TiUP 部署](/tiup/tiup-overview.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Kubernetes operator](https://docs.pingcap.com/tidb-in-kubernetes/stable) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [内置物理备份](/br/backup-and-restore-use-cases.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [Global Kill](/sql-statements/sql-statement-kill.md) | Y | Y | Y | Y | E | E | E | E | E | E | +| [Lock View](/information-schema/information-schema-data-lock-waits.md) | Y | Y | Y | Y | Y | Y | Y | E | E | E | +| [`SHOW CONFIG`](/sql-statements/sql-statement-show-config.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +| [`SET CONFIG`](/dynamic-config.md) | Y | Y | Y | Y | E | E | E | E | E | E | +| [DM WebUI](/dm/dm-webui-guide.md) | E | E | E | E | N | N | N | N | N | N | +| [前台限流](/tikv-configuration-file.md#前台限流) | Y | Y | Y | E | N | N | N | N | N | N | +| [后台限流](/tikv-configuration-file.md#后台限流) | E | E | E | N | N | N | N | N | N | N | +| [基于 EBS 的备份和恢复](https://docs.pingcap.com/zh/tidb-in-kubernetes/v1.4/volume-snapshot-backup-restore) | Y | Y | Y | N | N | N | N | N | N | N | +| [PITR](/br/br-pitr-guide.md) | Y | Y | Y | N | N | N | N | N | N | N | +| [全局内存控制](/configure-memory-usage.md#如何配置-tidb-server-实例使用内存的阈值) | Y | Y | Y | N | N | N | N | N | N | N | +| [RawKV 跨集群复制](/tikv-configuration-file.md#api-version-从-v610-版本开始引入) | E | E | E | N | N | N | N | N | N | N | +| [Green GC](/system-variables.md#tidb_gc_scan_lock_mode-从-v50-版本开始引入) | E | E | E | E | E | E | E | E | E | N | +| [资源管控 (Resource Control)](/tidb-resource-control.md) | E | E | N | N | N | N | N | N | N | N | +| [TiFlash 存算分离架构与 S3 支持](/tiflash/tiflash-disaggregated-and-s3.md) | E | N | N | N | N | N | N | N | N | N | [^1]: TiDB 误将 latin1 处理为 utf8 的子集。见 [TiDB #18955](https://github.com/pingcap/tidb/issues/18955)。 @@ -235,4 +241,6 @@ aliases: ['/docs-cn/dev/basic-features/','/docs-cn/dev/experimental-features-4.0 [^4]: 从 [TiDB v6.4.0](/releases/release-6.4.0.md) 开始,支持[高性能、全局单调递增的 `AUTO_INCREMENT` 列](/auto-increment.md#mysql-兼容模式) -[^5]: 对于 TiDB v4.0,事务 `LOAD DATA` 不保证原子性。 +[^5]: 对于 [TiDB v7.0.0](/releases/release-7.0.0.md),新增参数 `FORMAT`、`FIELDS DEFINED NULL BY`、`With batch_size=,detached`,以及新增支持从 S3 和 GCS 导入数据,均为实验特性。 + +[^6]: 对于 TiDB v4.0,事务 `LOAD DATA` 不保证原子性。 diff --git a/best-practices/java-app-best-practices.md b/best-practices/java-app-best-practices.md index 3c90a7460462..7c109ba3c7b3 100644 --- a/best-practices/java-app-best-practices.md +++ b/best-practices/java-app-best-practices.md @@ -187,7 +187,7 @@ TiDB 提供两个与 MySQL 兼容的超时控制参数,`wait_timeout` 和 `max TiDB (MySQL) 连接建立是比较昂贵的操作(至少对于 OLTP),除了建立 TCP 连接外还需要进行连接鉴权操作,所以客户端通常会把 TiDB (MySQL) 连接保存到连接池中进行复用。 -Java 的连接池实现很多 ([HikariCP](https://github.com/brettwooldridge/HikariCP), [tomcat-jdbc](https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html), [druid](https://github.com/alibaba/druid), [c3p0](https://www.mchange.com/projects/c3p0/), [dbcp](https://commons.apache.org/proper/commons-dbcp/)),TiDB 不会限定使用的连接池,应用可以根据业务特点自行选择连接池实现。 +Java 的连接池实现很多 ([HikariCP](https://github.com/brettwooldridge/HikariCP), [tomcat-jdbc](https://tomcat.apache.org/tomcat-10.1-doc/jdbc-pool.html), [druid](https://github.com/alibaba/druid), [c3p0](https://www.mchange.com/projects/c3p0/), [dbcp](https://commons.apache.org/proper/commons-dbcp/)),TiDB 不会限定使用的连接池,应用可以根据业务特点自行选择连接池实现。 ### 连接数配置 diff --git a/br/backup-and-restore-use-cases.md b/br/backup-and-restore-use-cases.md index 049b55227691..b6410536f4d0 100644 --- a/br/backup-and-restore-use-cases.md +++ b/br/backup-and-restore-use-cases.md @@ -17,7 +17,7 @@ aliases: ['/docs-cn/dev/br/backup-and-restore-use-cases/','/docs-cn/dev/referenc ## 部署 TiDB 集群和 br 命令行工具 -使用 PITR 功能,需要部署 v6.2.0 或以上版本的 TiDB 集群,并且更新 br 命令行工具到与 TiDB 集群相同的版本,本文假设使用的是 v6.6.0 版本。 +使用 PITR 功能,需要部署 v6.2.0 或以上版本的 TiDB 集群,并且更新 br 命令行工具到与 TiDB 集群相同的版本,本文假设使用的是 v7.0.0 版本。 下表介绍了在 TiDB 集群中使用日志备份功能的推荐配置。 @@ -44,13 +44,13 @@ aliases: ['/docs-cn/dev/br/backup-and-restore-use-cases/','/docs-cn/dev/referenc - 安装: ```shell - tiup install br:v6.6.0 + tiup install br:v7.0.0 ``` - 升级: ```shell - tiup update br:v6.6.0 + tiup update br:v7.0.0 ``` ## 配置备份存储 (Amazon S3) diff --git a/develop/dev-guide-connection-parameters.md b/develop/dev-guide-connection-parameters.md index 19b2f7dca623..ef57465332a5 100644 --- a/develop/dev-guide-connection-parameters.md +++ b/develop/dev-guide-connection-parameters.md @@ -13,7 +13,7 @@ aliases: ['/zh/tidb/dev/connection-parameters'] TiDB (MySQL) 连接建立是比较昂贵的操作(至少对于 OLTP 来讲),除了建立 TCP 连接外还需要进行连接鉴权操作,所以客户端通常会把 TiDB (MySQL) 连接保存到连接池中进行复用。 -Java 的连接池实现很多 ([HikariCP](https://github.com/brettwooldridge/HikariCP), [tomcat-jdbc](https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html), [durid](https://github.com/alibaba/druid), [c3p0](https://www.mchange.com/projects/c3p0/), [dbcp](https://commons.apache.org/proper/commons-dbcp/)),TiDB 不会限定使用的连接池,应用可以根据业务特点自行选择连接池实现。 +Java 的连接池实现很多 ([HikariCP](https://github.com/brettwooldridge/HikariCP), [tomcat-jdbc](https://tomcat.apache.org/tomcat-10.1-doc/jdbc-pool.html), [durid](https://github.com/alibaba/druid), [c3p0](https://www.mchange.com/projects/c3p0/), [dbcp](https://commons.apache.org/proper/commons-dbcp/)),TiDB 不会限定使用的连接池,应用可以根据业务特点自行选择连接池实现。 ### 连接数配置 diff --git a/dm/quick-start-create-task.md b/dm/quick-start-create-task.md index 96ca2feae8fc..5f0e2fba298d 100644 --- a/dm/quick-start-create-task.md +++ b/dm/quick-start-create-task.md @@ -69,7 +69,7 @@ docker run --rm --name mysql-3307 -p 3307:3307 -e MYSQL_ALLOW_EMPTY_PASSWORD=tru {{< copyable "shell-regular" >}} ```bash -wget https://download.pingcap.org/tidb-community-server-v6.6.0-linux-amd64.tar.gz +wget https://download.pingcap.org/tidb-community-server-v7.0.0-linux-amd64.tar.gz tar -xzvf tidb-latest-linux-amd64.tar.gz mv tidb-latest-linux-amd64/bin/tidb-server ./ ./tidb-server -P 4000 --store mocktikv --log-file "./tidb.log" & diff --git a/faq/sql-faq.md b/faq/sql-faq.md index 85f300b0b85e..50be67d5e163 100644 --- a/faq/sql-faq.md +++ b/faq/sql-faq.md @@ -201,24 +201,23 @@ TiDB 中的 `SHOW PROCESSLIST` 与 MySQL 中的 `SHOW PROCESSLIST` 显示内容 TiDB 支持改变[全局](/system-variables.md#tidb_force_priority)或单个语句的优先级。优先级包括: -- HIGH_PRIORITY:该语句为高优先级语句,TiDB 在执行阶段会优先处理这条语句 -- LOW_PRIORITY:该语句为低优先级语句,TiDB 在执行阶段会降低这条语句的优先级 +- `HIGH_PRIORITY`:该语句为高优先级语句,TiDB 在执行阶段会优先处理这条语句 +- `LOW_PRIORITY`:该语句为低优先级语句,TiDB 在执行阶段会降低这条语句的优先级 +- `DELAYED`:该语句为正常优先级语句,TiDB 不强制改变这条语句的优先级,与 `tidb_force_priority` 设置为 `NO_PRIORITY` 相同 以上两种参数可以结合 TiDB 的 DML 语言进行使用,使用方法举例如下: 1. 通过在数据库中写 SQL 的方式来调整优先级: - {{< copyable "sql" >}} - ```sql - select HIGH_PRIORITY | LOW_PRIORITY count(*) from table_name; - insert HIGH_PRIORITY | LOW_PRIORITY into table_name insert_values; - delete HIGH_PRIORITY | LOW_PRIORITY from table_name; - update HIGH_PRIORITY | LOW_PRIORITY table_reference set assignment_list where where_condition; - replace HIGH_PRIORITY | LOW_PRIORITY into table_name; + SELECT HIGH_PRIORITY | LOW_PRIORITY | DELAYED COUNT(*) FROM table_name; + INSERT HIGH_PRIORITY | LOW_PRIORITY | DELAYED INTO table_name insert_values; + DELETE HIGH_PRIORITY | LOW_PRIORITY | DELAYED FROM table_name; + UPDATE HIGH_PRIORITY | LOW_PRIORITY | DELAYED table_reference SET assignment_list WHERE where_condition; + REPLACE HIGH_PRIORITY | LOW_PRIORITY | DELAYED INTO table_name; ``` -2. 全表扫会自动调整为低优先级,analyze 也是默认低优先级。 +2. 全表扫会自动调整为低优先级,[`ANALYZE`](/sql-statements/sql-statement-analyze-table.md) 也是默认低优先级。 ## 在 TiDB 中 auto analyze 的触发策略是怎样的? diff --git a/grafana-resource-control-dashboard.md b/grafana-resource-control-dashboard.md index eb1e6e15fda1..d209d02d474b 100644 --- a/grafana-resource-control-dashboard.md +++ b/grafana-resource-control-dashboard.md @@ -11,26 +11,36 @@ summary: 了解资源管控 (Resource Control) 的 Grafana Dashboard 中所展 如果你的集群配置了 [Resource Control](/tidb-resource-control.md) ,通过观察 Resource Control 面板上的 Metrics,你可以了解当前集群整体的资源消耗状态。 +TiDB 使用[令牌桶算法](https://en.wikipedia.org/wiki/Token_bucket) 做流控,正如资源管控实现机制 ([RFC: Global Resource Control in TiDB](https://github.com/pingcap/tidb/blob/master/docs/design/2022-11-25-global-resource-control.md#distributed-token-buckets)) 中所描述:一个 TiDB 节点可能存在多个 Resource Group(资源组),将在 PD 端的 GAC(Global Admission Control)进行流控。每个 TiDB 节点中的本地令牌桶(Local Token Buckets)将定期(默认 5 秒)与 PD 端的 GAC 进行通信,以重新配置本地令牌。其中的本地令牌桶(Local Token Buckets)具体实现为 Resource Controller Client。 + 以下为 **Resource Control** 关键监控指标的说明。 ## Request Unit 相关指标 -- RU:以 Resource Group 为单位进行实时统计的 [Request Unit (RU)](/tidb-resource-control.md#什么是-request-unit-ru) 消耗信息。`total` 为当前所有 Resource Group 消耗的 Request Unit 之和。每个 Resource Group 的 Request Unit 消耗等于其读消耗 (Read Request Unit) 和写消耗 (Write Request Unit) 之和。 +- RU:以 Resource Group(资源组)为单位进行实时统计的 [Request Unit (RU)](/tidb-resource-control.md#什么是-request-unit-ru) 消耗信息。`total` 为当前所有 Resource Group 消耗的 Request Unit 之和。每个 Resource Group 的 Request Unit 消耗等于其读消耗 (Read Request Unit) 和写消耗 (Write Request Unit) 之和。 - RU Per Query:平均每个 SQL 语句消耗的 Request Unit 数量。计算方法是将前述 Request Unit 监控指标除以当前每秒执行的 SQL 语句数量。 - RRU:以 Resource Group 为单位进行实时统计的读请求 Read Request Unit 消耗信息。`total` 为当前所有 Resource Group 消耗的 Read Request Unit 之和。 - RRU Per Query:平均每个 SQL 语句消耗的 Read Request Unit 数量。计算方法是将前述 Read Request Unit 监控指标除以当前每秒执行的 SQL 语句数量。 - WRU:以 Resource Group 为单位进行实时统计的写请求 Write Request Unit 消耗信息。`total` 为当前所有 Resource Group 消耗的 Write Request Unit 之和。 - WRU Per Query:平均每个 SQL 语句消耗的 Write Request Unit 数量。计算方法是将前述 Write Request Unit 监控指标除以当前每秒执行的 SQL 语句数量。 -## 资源相关指标 +## Resource 相关指标 -- KV Request Count:以 Resource Group 为单位进行实时统计的 KV 请求数量,区分了读和写两种类型。`total` 为当前所有 Resource Group 涉及的 KV 请求数量之和。 +- KV Request Count:以 Resource Group(资源组)为单位进行实时统计的 KV 请求数量,区分了读和写两种类型。`total` 为当前所有 Resource Group 涉及的 KV 请求数量之和。 - KV Request Count Per Query:平均每个 SQL 语句涉及的读写 KV 请求数量。计算方法是将前述 KV Request Count 监控指标除以当前每秒执行的 SQL 语句数量。 - Bytes Read:以 Resource Group 为单位进行实时统计的读取数据量。`total` 为当前所有 Resource Group 读取数据量之和。 - Bytes Read Per Query:平均每个 SQL 语句的读取数据量。将前述 Bytes Read 监控指标除以当前每秒执行的 SQL 语句数量。 - Bytes Written:以 Resource Group 为单位进行实时统计的写入数据量。`total` 为当前所有 Resource Group 写入数据量之和。 - Bytes Written Per Query:平均每个 SQL 语句的写入数据量。计算方法是将前述 Bytes Written 监控指标除以当前每秒执行的 SQL 语句数量。 - KV CPU Time:以 Resource Group 为单位进行实时统计的 KV 层 CPU 时间消耗。`total` 为当前所有 Resource Group 消耗 KV 层 CPU 时间之和。 -- KV CPU Time Per Query:平均每个 SQL 语句的 KV 层 CPU 时间消耗之和。计算方法是将前述 KV CPU Time 监控指标除以当前每秒执行的 SQL 语句数量。 - SQL CPU Time:以 Resource Group 为单位进行实时统计的 SQL 层 CPU 时间消耗。`total` 为当前所有 Resource Group 消耗 SQL 层 CPU 时间之和。 -- SQL CPU Time Per Query:平均每个 SQL 语句的 SQL 层 CPU 时间消耗之和。计算方法是将前述 SQL CPU Time 监控除以当前每秒执行的 SQL 语句数量。 + +## Resource Controller Client 相关指标 + +- Active Resource Groups:实时统计各个 Resource Controller Client 的 Resource Groups 数量。 +- Total KV Request Count:以 Resource Group 为单位,实时统计各个 Resource Controller Client 的 KV 请求数量。`total` 为 Resource Controller Client 下 KV 请求数量之和。 +- Failed KV Request Count:以 Resource Group 为单位,实时统计各个 Resource Controller Client 的 KV 失败请求数量。`total` 为 Resource Controller Client 下 KV 失败请求数量之和。 +- Successful KV Request Count:以 Resource Group 为单位,实时统计各个 Resource Controller Client 的 KV 成功请求数量。`total` 为 Resource Controller Client 下 KV 成功请求数量之和。 +- Successful KV Request Wait Duration (99/90):以 Resource Group 为单位,实时统计各个 Resource Controller Client 成功 KV 请求的等待时间(不同百分位)。 +- Token Request Handle Duration (999/99):以 Resource Group 为单位,实时统计各个 Resource Controller Client 向 Server 端申请 Token 等待的响应时间(不同百分位)。 +- Token Request Count:以 Resource Group 为单位,实时统计各个 Resource Controller Client 向 Server 端申请 Token 的次数。`successful` 和 `failed` 分别为 Resource Controller Client 下申请 Token 成功和失败数量之和。 diff --git a/migration-tools.md b/migration-tools.md index c3febf34a937..8d9c942021f7 100644 --- a/migration-tools.md +++ b/migration-tools.md @@ -7,19 +7,70 @@ summary: 介绍 TiDB 的数据迁移工具。 TiDB 提供了丰富的数据迁移相关的工具,用于全量迁移、增量迁移、备份恢复、数据同步等多种场景。 -本文介绍了使用这些工具的场景、优势和相关限制等信息。请根据你的需求选择合适的工具。 - -下表介绍了迁移工具的使用场景、支持的上下游等信息。 - -| 名称 | 使用场景 | 上游(或输入源文件) | 下游(或输出文件) |主要优势 | 使用限制 | -|:---|:---|:---|:---|:---|:---| -| [TiDB DM](/dm/dm-overview.md)|用于将数据从与 MySQL 协议兼容的数据库迁移到 TiDB。 | MySQL,MariaDB,Aurora,MySQL| TiDB | 一体化的数据迁移任务管理工具,支持全量迁移和增量同步;支持对表与操作进行过滤;支持分库分表的合并迁移。 | 建议用于 1 TB 以内的存量数据迁移。| -| [Dumpling](/dumpling-overview.md) | 用于将数据从 MySQL/TiDB 进行全量导出。| MySQL,TiDB| SQL,CSV | 支持全新的 table-filter,筛选数据更加方便;支持导出到 Amazon S3 云盘|如果导出后计划往非 TiDB 的数据库恢复,建议使用 Dumpling;如果是往另一个 TiDB 恢复,建议使用 BR。 | -| [TiDB Lightning](/tidb-lightning/tidb-lightning-overview.md)| 用于将数据全量导入到 TiDB。|Dumpling 输出的文件;CSV 文件;从 Hive 或者 Aurora 导出的 Parquet 文件;从本地盘或 Amazon S3 云盘读取数据。 | TiDB | 支持迅速导入大量新数据,实现快速初始化 TiDB 集群的指定表;支持断点续传;支持数据过滤。| 如果使用 Physical Import Mode 进行数据导入,TiDB Lightning 运行后,TiDB 集群将无法正常对外提供服务。如果你不希望 TiDB 集群的对外服务受到影响,可以参考 TiDB Lightning Logical Import Mode 中的硬件需求与部署方式进行数据导入。| -|[Backup & Restore (BR)](/br/backup-and-restore-overview.md) |通过对大数据量的 TiDB 集群进行数据备份和恢复,实现数据迁移。 | TiDB| SST;backup.meta 文件;backup.lock 文件|适用于向另一个 TiDB 迁移数据。支持数据冷备份到外部存储,可以用于灾备恢复。 | BR 恢复到 TiCDC / Drainer 的上游集群时,恢复数据无法由 TiCDC / Drainer 同步到下游。BR 只支持在 new_collations_enabled_on_first_bootstrap 开关值相同的集群之间进行操作。| -| [TiCDC](/ticdc/ticdc-overview.md)| 通过拉取 TiKV 变更日志实现的 TiDB 增量数据同步工具,具有将数据还原到与上游任意 TSO 一致状态的能力,支持其他系统订阅数据变更。|TiDB | TiDB,MySQL,Kafka,Confluent|提供开放数据协议 (TiCDC Open Protocol)。 | TiCDC 只能同步至少存在一个有效索引的表。暂不支持以下场景:暂不支持单独使用 RawKV 的 TiKV 集群。暂不支持在 TiDB 中创建 SEQUENCE 的 DDL 操作和 SEQUENCE 函数。| -|[TiDB Binlog](/tidb-binlog/tidb-binlog-overview.md) | 用于 TiDB 集群间的增量数据同步,如将其中一个 TiDB 集群作为另一个 TiDB 集群的从集群。| TiDB | TiDB,MySQL,Kafka,增量备份文件|支持实时备份和恢复。备份 TiDB 集群数据,同时可以用于 TiDB 集群故障时恢复。 |与部分 TiDB 版本不兼容,不能一起使用。推荐使用 [TiCDC](/ticdc/ticdc-overview.md) 替代 TiDB Binlog。| -|[sync-diff-inspector](/sync-diff-inspector/sync-diff-inspector-overview.md) | 用于校验 MySQL/TiDB 中两份数据的一致性。|TiDB,MySQL | TiDB,MySQL| 提供了修复数据的功能,适用于修复少量不一致的数据。|对于 MySQL 和 TiDB 之间的数据同步不支持在线校验。不支持 JSON、BIT、BINARY、BLOB 等类型的数据。 | +本文介绍了使用这些工具的场景、支持的上下游、优势和相关限制等信息。请根据你的需求选择合适的工具。 + +## [TiDB Data Migration (DM)](/dm/dm-overview.md) + +| 使用场景 | 用于将数据从与 MySQL 协议兼容的数据库迁移到 TiDB | +|---|---| +| **上游** | MySQL,MariaDB,Aurora | +| **下游** | TiDB | +| **主要优势** | | +| **使用限制** | 数据导入速度与 TiDB Lightning 的 [Logical Import Mode](/tidb-lightning/tidb-lightning-logical-import-mode.md) 大致相同,而比TiDB Lightning 的 [Physical Import Mode](/tidb-lightning/tidb-lightning-physical-import-mode.md) 低很多。建议用于 1 TB 以内的存量数据迁移。 | + +## [Dumpling](/dumpling-overview.md) + +| 使用场景 | 用于将数据从 MySQL/TiDB 进行全量导出 | +|---|---| +| **上游** | MySQL,TiDB | +| **下游(输出文件)** | SQL,CSV | +| **主要优势** | | +| **使用限制** | | + +## [TiDB Lightning](/tidb-lightning/tidb-lightning-overview.md) + +| 使用场景 | 用于将数据全量导入到 TiDB | +|---|---| +| **上游(输入源文件)** | | +| **下游** | TiDB | +| **主要优势** | | +| **使用限制** | | + +## [Backup & Restore (BR)](/br/backup-and-restore-overview.md) + +| 使用场景 | 通过对大数据量的 TiDB 集群进行数据备份和恢复,实现数据迁移 | +|---|---| +| **上游** | TiDB | +| **下游(输出文件)** | SST,backup.meta 文件,backup.lock 文件 | +| **主要优势** | | +| **使用限制** | | + +## [TiCDC](/ticdc/ticdc-overview.md) + +| 使用场景 | 通过拉取 TiKV 变更日志实现的 TiDB 增量数据同步工具,具有将数据还原到与上游任意 TSO 一致状态的能力,支持其他系统订阅数据变更 | +|---|---| +| **上游** | TiDB | +| **下游** | TiDB,MySQL,Kafka,Confluent | +| **主要优势** | 提供开放数据协议 (TiCDC Open Protocol)。| +| **使用限制** | TiCDC 只能同步至少存在一个有效索引的表。暂不支持以下场景: | + +## [TiDB Binlog](/tidb-binlog/tidb-binlog-overview.md) + +| 使用场景 | 用于 TiDB 集群间的增量数据同步,如将其中一个 TiDB 集群作为另一个 TiDB 集群的从集群 | +|---|---| +| **上游** | TiDB | +| **下游(输出文件)** | TiDB,MySQL,Kafka,增量备份文件 | +| **主要优势** | | +| **使用限制** | 与部分 TiDB 版本不兼容。推荐使用 [TiCDC](/ticdc/ticdc-overview.md) 替代 TiDB Binlog。| + +## [sync-diff-inspector](/sync-diff-inspector/sync-diff-inspector-overview.md) + +| 使用场景 | 用于校验 MySQL/TiDB 中两份数据的一致性 | +|---|---| +| **上游** | TiDB,MySQL | +| **下游** | TiDB,MySQL | +| **主要优势** | 提供了修复数据的功能,适用于修复少量不一致的数据。| +| **使用限制** | | ## 使用 TiUP 快速安装 @@ -27,15 +78,11 @@ TiDB 提供了丰富的数据迁移相关的工具,用于全量迁移、增量 ### 第 1 步:安装 TiUP -{{< copyable "shell-regular" >}} - ```shell curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh ``` -重新声明全局环境变量 - -{{< copyable "shell-regular" >}} +重新声明全局环境变量: ```shell source ~/.bash_profile @@ -45,8 +92,6 @@ source ~/.bash_profile 你可以通过以下命令查看所有可用组件: -{{< copyable "shell-regular" >}} - ```shell tiup list ``` @@ -75,8 +120,6 @@ tiup pingcap TiUP is a command-line component management tool that c 选择所需要的组件进行安装 -{{< copyable "shell-regular" >}} - ```shell tiup install dumpling tidb-lightning ``` @@ -87,9 +130,7 @@ tiup install dumpling tidb-lightning ### 第 3 步: 更新 TiUP 及组件 (可选) -建议先查看新版本的更新日志及兼容性说明 - -{{< copyable "shell-regular" >}} +建议先查看新版本的更新日志及兼容性说明: ```shell tiup update --self && tiup update dm diff --git a/pd-control.md b/pd-control.md index 40fa02815359..babab2a42955 100644 --- a/pd-control.md +++ b/pd-control.md @@ -28,7 +28,7 @@ PD Control 是 PD 的命令行工具,用于获取集群状态信息和调整 > **注意:** > -> 下载链接中的 `{version}` 为 TiDB 的版本号。例如,amd64 架构的 `v6.6.0` 版本的下载链接为 `https://download.pingcap.org/tidb-community-server-v6.6.0-linux-amd64.tar.gz`。 +> 下载链接中的 `{version}` 为 TiDB 的版本号。例如,amd64 架构的 `v7.0.0` 版本的下载链接为 `https://download.pingcap.org/tidb-community-server-v7.0.0-linux-amd64.tar.gz`。 ### 源码编译 @@ -941,7 +941,7 @@ region keys --format=raw a z -1 {{< copyable "" >}} ```bash -region keys --format=raw a "" 20 +region keys --format=raw a "" 20 ``` ``` diff --git a/production-deployment-using-tiup.md b/production-deployment-using-tiup.md index 8b180ca17f25..7449663f2e1f 100644 --- a/production-deployment-using-tiup.md +++ b/production-deployment-using-tiup.md @@ -341,13 +341,13 @@ alertmanager_servers: {{< copyable "shell-regular" >}} ```shell - tiup cluster deploy tidb-test v6.6.0 ./topology.yaml --user root [-p] [-i /home/root/.ssh/gcp_rsa] + tiup cluster deploy tidb-test v7.0.0 ./topology.yaml --user root [-p] [-i /home/root/.ssh/gcp_rsa] ``` 以上部署示例中: - `tidb-test` 为部署的集群名称。 -- `v6.6.0` 为部署的集群版本,可以通过执行 `tiup list tidb` 来查看 TiUP 支持的最新可用版本。 +- `v7.0.0` 为部署的集群版本,可以通过执行 `tiup list tidb` 来查看 TiUP 支持的最新可用版本。 - 初始化配置文件为 `topology.yaml`。 - `--user root` 表示通过 root 用户登录到目标主机完成集群部署,该用户需要有 ssh 到目标机器的权限,并且在目标机器有 sudo 权限。也可以用其他有 ssh 和 sudo 权限的用户完成部署。 - [-i] 及 [-p] 为可选项,如果已经配置免密登录目标机,则不需填写。否则选择其一即可,[-i] 为可登录到目标机的 root 用户(或 --user 指定的其他用户)的私钥,也可使用 [-p] 交互式输入该用户的密码。 diff --git a/quick-start-with-tidb.md b/quick-start-with-tidb.md index d37c64e4718c..1e74696445b8 100644 --- a/quick-start-with-tidb.md +++ b/quick-start-with-tidb.md @@ -81,10 +81,10 @@ TiDB 是一个分布式系统。最基础的 TiDB 测试集群通常由 2 个 Ti {{< copyable "shell-regular" >}} ```shell - tiup playground v6.6.0 --db 2 --pd 3 --kv 3 + tiup playground v7.0.0 --db 2 --pd 3 --kv 3 ``` - 上述命令会在本地下载并启动某个版本的集群(例如 v6.6.0)。最新版本可以通过执行 `tiup list tidb` 来查看。运行结果将显示集群的访问方式: + 上述命令会在本地下载并启动某个版本的集群(例如 v7.0.0)。最新版本可以通过执行 `tiup list tidb` 来查看。运行结果将显示集群的访问方式: ```log CLUSTER START SUCCESSFULLY, Enjoy it ^-^ @@ -198,10 +198,10 @@ TiDB 是一个分布式系统。最基础的 TiDB 测试集群通常由 2 个 Ti {{< copyable "shell-regular" >}} ```shell - tiup playground v6.6.0 --db 2 --pd 3 --kv 3 + tiup playground v7.0.0 --db 2 --pd 3 --kv 3 ``` - 上述命令会在本地下载并启动某个版本的集群(例如 v6.6.0)。最新版本可以通过执行 `tiup list tidb` 来查看。运行结果将显示集群的访问方式: + 上述命令会在本地下载并启动某个版本的集群(例如 v7.0.0)。最新版本可以通过执行 `tiup list tidb` 来查看。运行结果将显示集群的访问方式: ```log CLUSTER START SUCCESSFULLY, Enjoy it ^-^ diff --git a/releases/release-6.6.0.md b/releases/release-6.6.0.md index e5b133e4c5aa..73cdace55276 100644 --- a/releases/release-6.6.0.md +++ b/releases/release-6.6.0.md @@ -9,7 +9,7 @@ summary: 了解 TiDB 6.6.0 版本的新功能、兼容性变更、改进提升 TiDB 版本:6.6.0-[DMR](/releases/versioning.md#开发里程碑版本) -试用链接:[快速体验](https://docs.pingcap.com/zh/tidb/v6.6/quick-start-with-tidb) | [下载离线包](https://cn.pingcap.com/product-community/) +试用链接:[快速体验](https://docs.pingcap.com/zh/tidb/v6.6/quick-start-with-tidb) | [下载离线包](https://cn.pingcap.com/product-community/?version=v6.6.0-DMR#version-list) 在 6.6.0 版本中,你可以获得以下关键特性: diff --git a/releases/release-7.0.0.md b/releases/release-7.0.0.md new file mode 100644 index 000000000000..1fbea320138d --- /dev/null +++ b/releases/release-7.0.0.md @@ -0,0 +1,510 @@ +--- +title: TiDB 7.0.0 Release Notes +summary: 了解 TiDB 7.0.0 版本的新功能、兼容性变更、改进提升,以及错误修复。 +--- + +# TiDB 7.0.0 Release Notes + +发版日期:2023 年 3 月 30 日 + +TiDB 版本:7.0.0 + +试用链接:[快速体验](https://docs.pingcap.com/zh/tidb/v7.0/quick-start-with-tidb) | [下载离线包](https://cn.pingcap.com/product-community/) + +在 7.0.0 版本中,你可以获得以下关键特性: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
分类功能描述
可扩展性与性能会话级别内无需手动准备 SQL 执行计划缓存(实验特性)支持在会话级别自动重用执行计划缓存,可以减少编译并缩短相同 SQL 查询的时间,而无需事先手动准备 Prepare Statement 语句。
TiFlash 支持存储计算分离和 S3 共享存储(实验特性)TiFlash 增加云原生架构的支持作为可选项: +
    +
  • 支持存算分离架构,提升 HTAP 资源的弹性能力。
  • +
  • 支持基于 S3 的存储引擎,以更低的成本提供共享存储。
  • +
+
稳定性与高可用增强了资源管控(实验特性)支持使用资源组来为一个集群中的不同应用或工作负载分配和隔离资源。在这个版本中,TiDB 增加了对不同资源的绑定模式(用户级、会话级、语句级)和用户定义的优先级的支持,你还可以使用命令来对集群整体资源量进行预估。
TiFlash 支持数据落盘TiFlash 支持将中间结果落盘,以缓解数据密集型操作(如聚合、排序和 Hash Join)中的 OOM 问题。
SQL行级 TTL (GA)支持通过后台任务自动删除超过生命周期(Time to live)的数据,并以此来自动管理数据规模并提高性能。
支持 REORGANIZE PARTITION 语法(List/Range 分区表)REORGANIZE PARTITION 语句可用于合并相邻分区,或将一个分区拆分为多个分区,从而提升分区表的易用性。
数据库管理与可观测性
TiDB 通过 LOAD DATA 语句集成 TiDB Lightning(实验特性)集成 TiDB Lightning 的逻辑导入模式使 LOAD DATA 语句更加强大,例如支持从 S3/GCS 导入数据、支持任务管理等。
TiCDC 支持对象存储 Sink (GA)TiCDC 支持将行变更事件同步到对象存储服务,包括 Amazon S3、GCS、Azure Blob Storage 和 NFS 等。
+ +## 功能详情 + +### 可扩展性 + +* TiFlash 支持存算分离和对象存储(实验特性)[#6882](https://github.com/pingcap/tiflash/issues/6882) @[flowbehappy](https://github.com/flowbehappy) @[JaySon-Huang](https://github.com/JaySon-Huang) @[breezewish](https://github.com/breezewish) @[JinheLin](https://github.com/JinheLin) @[lidezhu](https://github.com/lidezhu) @[CalvinNeo](https://github.com/CalvinNeo) + + 在 v7.0.0 之前的版本中,TiFlash 为存算一体架构。在此架构下,TiFlash 节点既是存储节点,也是计算节点,TiFlash 的计算能力和存储能力无法独立扩展;同时,TiFlash 节点只能使用本地存储。 + + 从 v7.0.0 起,TiFlash 新增存算分离架构。在此架构下,TiFlash 节点分为 Compute Node (计算节点)和 Write Node(写入节点)两种类型,并支持兼容 S3 API 的对象存储。这两种节点都可以单独扩缩容,独立调整计算或数据存储能力。TiFlash 的存算分离架构和存算一体架构不能混合使用、相互转换,需要在部署 TiFlash 时进行相应的配置指定使用其中的一种架构。 + + 更多信息,请参考[用户文档](/tiflash/tiflash-disaggregated-and-s3.md)。 + +### 性能 + +* 实现 Fast Online DDL 和 PITR 的兼容 [#38045](https://github.com/pingcap/tidb/issues/38045) @[Leavrth](https://github.com/Leavrth) + + TiDB v6.5.0 中 [Fast Online DDL](/system-variables.md#tidb_ddl_enable_fast_reorg-从-v630-版本开始引入) 功能和 [PITR](/br/backup-and-restore-overview.md) 未完全兼容。在使用 TiDB v6.5.0 时,建议先停止 PITR 后台备份任务,以 Fast Online DDL 方式快速添加索引,然后再启动 PITR 备份任务实现全量数据备份。 + + 从 TiDB v7.0.0 开始,Fast Online DDL 和 PITR 已经完全兼容。通过 PITR 恢复集群数据时,系统将自动回放日志备份期间记录的通过 Fast Online DDL 方式添加的索引操作,达到兼容效果。 + + 更多信息,请参考[用户文档](/ddl-introduction.md)。 + +* TiFlash 引擎支持 Null-Aware Semi Join 和 Null-Aware Anti Semi Join 算子 [#6674](https://github.com/pingcap/tiflash/issues/6674) @[gengliqi](https://github.com/gengliqi) + + 当使用 `IN`、`NOT IN`、`= ANY` 或 `!= ALL` 算子引导的关联子查询时,TiDB 会将其转化为 Semi Join 或 Anti Semi Join,从而提升计算性能。如果转换后的 Join key 列可能为 `NULL`,则需要具有 Null-Aware 特性的 Join 算法,即 [Null-Aware Semi Join](/explain-subqueries.md#null-aware-semi-joinin-和--any-子查询) 和 [Null-Aware Anti Semi Join](/explain-subqueries.md#null-aware-anti-semi-joinnot-in-和--all-子查询) 算子。 + + 在 v7.0.0 之前的版本中,TiFlash 引擎不支持 Null-Aware Semi Join 和 Null-Aware Anti Semi Join 算子,因此无法将这些子查询直接下推至 TiFlash 引擎进行计算。从 TiDB v7.0.0 开始,TiFlash 引擎支持了 Null-Aware Semi Join 和 Null-Aware Anti Semi Join 算子。如果 SQL 包含这几种关联子查询,查询的表包含 TiFlash 副本,并且启用了 [MPP 模式](/tiflash/use-tiflash-mpp-mode.md),优化器将自动判断是否将 Null-Aware Semi Join 和 Null-Aware Anti Semi Join 算子下推至 TiFlash 引擎进行计算以提升整体性能。 + + 更多信息,请参考[用户文档](/tiflash/tiflash-supported-pushdown-calculations.md)。 + +* TiFlash 引擎支持 FastScan 功能 (GA) [#5252](https://github.com/pingcap/tiflash/issues/5252) @[hongyunyan](https://github.com/hongyunyan) + + 从 v6.3.0 开始,TiFlash 引擎引入了快速扫描功能 (FastScan) 作为实验特性。在 v7.0.0 中,该功能正式 GA。你可以使用系统变量 [`tiflash_fastscan`](/system-variables.md#tiflash_fastscan-从-v630-版本开始引入) 启用快速扫描功能。通过牺牲强一致性保证,该功能可以大幅提升扫表性能。如果对应的表仅进行 `INSERT` 操作,而没有 `UPDATE`/`DELETE` 操作,则快速扫描功能在提升扫表性能的同时不会损失强一致性。 + + 更多信息,请参考[用户文档](/tiflash/use-fastscan.md)。 + +* TiFlash 查询支持延迟物化功能(实验特性)[#5829](https://github.com/pingcap/tiflash/issues/5829) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) + + 当 `SELECT` 语句中包含过滤条件(`WHERE` 子句)时,TiFlash 默认会先读取该查询所需列的全部数据,然后再根据查询条件对数据进行过滤、聚合等计算任务。延迟物化是一种优化方式,它支持下推部分过滤条件到 TableScan 算子,即先扫描过滤条件相关的列数据,过滤得到符合条件的行后,再扫描这些行的其他列数据,继续后续计算,从而减少 IO 扫描和数据处理的计算量。 + + TiFlash 延迟物化默认关闭,可以通过将系统变量 [`tidb_opt_enable_late_materialization`](/system-variables.md#tidb_opt_enable_late_materialization-从-v700-版本开始引入) 设置为 `ON` 开启。开启后,TiDB 优化器会根据统计信息和查询的过滤条件,决定哪些过滤条件会被下推到 TableScan 算子。 + + 更多信息,请参考[用户文档](/tiflash/tiflash-late-materialization.md)。 + +* 支持缓存非 Prepare 语句的执行计划(实验特性)[#36598](https://github.com/pingcap/tidb/issues/36598) @[qw4990](https://github.com/qw4990) + + 执行计划缓存是提高并发 OLTP 负载能力的重要手段,TiDB 已经支持 [Prepare 语句的计划缓存](/sql-prepared-plan-cache.md)。在 v7.0.0 中,非 Prepare 语句的执行计划也能够被缓存,使执行计划缓存能够应用于更广泛的场景,从而提升 TiDB 的并发处理能力。 + + 这个功能目前默认关闭,你可以通过系统变量 [`tidb_enable_non_prepared_plan_cache`](/system-variables.md#tidb_enable_non_prepared_plan_cache) 打开。出于稳定性考虑,在当前版本中,TiDB 开辟了一块新的区域用于缓存非 Prepare 语句的执行计划,你可以通过系统变量 [`tidb_non_prepared_plan_cache_size`](/system-variables.md#tidb_non_prepared_plan_cache_size) 设置缓存大小。此外,该功能对 SQL 的模式也有一定的限制,具体参见[使用限制](/sql-non-prepared-plan-cache.md#限制)。 + + 更多信息,请参考[用户文档](/sql-non-prepared-plan-cache.md)。 + +* 解除执行计划缓存对子查询的限制 [#40219](https://github.com/pingcap/tidb/issues/40219) @[fzzf678](https://github.com/fzzf678) + + TiDB v7.0.0 移除了计划缓存对子查询的限制。带有子查询的 SQL 语句的执行计划可以被缓存,例如 `SELECT * FROM t WHERE a > (SELECT ...)`。这进一步扩大了执行计划缓存的应用范围,提高了 SQL 的执行效率。 + + 更多信息,请参考[用户文档](/sql-prepared-plan-cache.md)。 + +* TiKV 支持自动生成空的日志文件用于日志回收 [#14371](https://github.com/tikv/tikv/issues/14371) @[LykxSassinator](https://github.com/LykxSassinator) + + TiKV 在 v6.3.0 中引入了 [Raft 日志回收](/tikv-configuration-file.md#enable-log-recycle-从-v630-版本开始引入)特性,用以减少写负载的长尾延迟。但是,日志回收需要在 Raft 日志文件数量达到一定阈值后才能生效,使得用户无法直观感受到该特性对写负载吞吐的提升。 + + 为了改善用户体验,v7.0.0 正式引入了 [`raft-engine.prefill-for-recycle`](/tikv-configuration-file.md#prefill-for-recycle-从-v700-版本开始引入) 配置项,用以控制 TiKV 是否在进程启动时自动生成空的日志文件用于日志回收。该配置项启用时,TiKV 将在初始化时自动填充一批空日志文件用于日志回收,保证日志回收在初始化后立即生效。 + + 更多信息,请参考[用户文档](/tikv-configuration-file.md#prefill-for-recycle-从-v700-版本开始引入)。 + +* 支持从[窗口函数](/functions-and-operators/expressions-pushed-down.md)中推导 TopN 或 Limit 的优化规则,提升窗口函数的性能 [#13936](https://github.com/tikv/tikv/issues/13936) @[windtalker](https://github.com/windtalker) + + 该功能默认关闭,需要将 session 变量 [tidb_opt_derive_topn](/system-variables.md#tidb_opt_derive_topn-从-v700-版本开始引入) 设置为 `ON` 开启。 + + 更多信息,请参考[用户文档](/derive-topn-from-window.md)。 + +* 支持通过 Fast Online DDL 创建唯一索引 [#40730](https://github.com/pingcap/tidb/issues/40730) @[tangenta](https://github.com/tangenta) + + TiDB v6.5.0 支持通过 [Fast Online DDL](/system-variables.md#tidb_ddl_enable_fast_reorg-从-v630-版本开始引入) 方式创建普通的二级索引。从 v7.0.0 开始,TiDB 支持通过 Fast Online DDL 方式创建唯一索引。相比于 TiDB v6.1.0,大表添加唯一索引的性能预期将提升数倍。 + + 更多信息,请参考[用户文档](/ddl-introduction.md)。 + +### 稳定性 + +* 增强了资源管控特性 (实验特性) [#38825](https://github.com/pingcap/tidb/issues/38825) @[nolouch](https://github.com/nolouch) @[BornChanger](https://github.com/BornChanger) @[glorv](https://github.com/glorv) @[tiancaiamao](https://github.com/tiancaiamao) @[Connor1996](https://github.com/Connor1996) @[JmPotato](https://github.com/JmPotato) @[hnes](https://github.com/hnes) @[CabinfeverB](https://github.com/CabinfeverB) @[HuSharp](https://github.com/HuSharp) + + TiDB 优化了基于资源组的资源管控特性。该特性将会极大地提升 TiDB 集群的资源利用效率和性能表现。资源管控特性的引入对 TiDB 具有里程碑的意义,你可以将一个分布式数据库集群划分成多个逻辑单元,将不同的数据库用户映射到对应的资源组中,并根据需要设置每个资源组的配额。当集群资源紧张时,来自同一个资源组的会话所使用的全部资源将被限制在配额内,避免其中一个资源组过度消耗,从而影响其他资源组中的会话正常运行。 + + 该特性也可以将多个来自不同系统的中小型应用合入一个 TiDB 集群中,个别应用的负载提升,不会影响其他应用的正常运行。而在系统负载较低的时候,繁忙的应用即使超过设定的读写配额,也仍然可以被分配到所需的系统资源,达到资源的最大化利用。此外,合理利用资源管控特性可以减少集群数量,降低运维难度及管理成本。 + + 该特性不仅提供了 Grafana 内置的 Resource Control Dashboard 展示资源的实际使用情况,协助你更合理地配置资源,还支持基于会话和语句级别(Hint)的动态资源管控能力。这些功能的引入将帮助你更精确地掌控 TiDB 集群的资源使用情况,并根据实际需要动态调整配额。 + + 在 v7.0.0 中,支持为资源组设置绝对的调度优先级 (PRIORITY),保障重要业务能够获取到资源,同时也扩展了资源组的设置方式。 + + 你可以通过以下方式使用资源组: + + - 用户级别。通过 [`CREATE USER`](/sql-statements/sql-statement-create-user.md) 或 [`ALTER USER`](/sql-statements/sql-statement-alter-user.md) 语句将用户绑定到特定的资源组。绑定后,对应的用户新创建的会话会自动绑定对应的资源组。 + - 会话级别。通过 [`SET RESOURCE GROUP`](/sql-statements/sql-statement-set-resource-group.md) 设置当前会话的资源组。 + - 语句级别。通过 [`RESOURCE_GROUP()`](/optimizer-hints.md#resource_groupresource_group_name) 设置当前语句的资源组。 + + 更多信息,请参考[用户文档](/tidb-resource-control.md)。 + +* 支持 Fast Online DDL 的检查点机制,提升容错性和自动恢复能力 [#42164](https://github.com/pingcap/tidb/issues/42164) @[tangenta](https://github.com/tangenta) + + TiDB v7.0.0 引入 [Fast Online DDL](/system-variables.md#tidb_ddl_enable_fast_reorg-从-v630-版本开始引入) 的检查点机制,大幅提升 Fast Online DDL 的容错性和自动恢复能力。通过周期性记录并同步 DDL 进度,即使在 TiDB DDL Owner 故障重启或切换时,正在执行中的 DDL 仍能以 Fast Online DDL 方式继续执行,从而让 DDL 执行更加稳定高效。 + + 更多信息,请参考[用户文档](/ddl-introduction.md)。 + +* TiFlash 引擎支持数据落盘 (Spill to disk) [#6528](https://github.com/pingcap/tiflash/issues/6528) @[windtalker](https://github.com/windtalker) + + 为了提高执行性能,TiFlash 引擎尽可能将数据全部放在内存中运行。当数据量超过内存总大小时,TiFlash 会终止查询,避免内存耗尽导致系统崩溃。因此,TiFlash 可处理的数据量受限于可用的内存大小。 + + 从 v7.0.0 开始,TiFlash 引擎支持数据落盘功能,通过调整算子内存使用阈值 [`tidb_max_bytes_before_tiflash_external_group_by`](/system-variables.md#tidb_max_bytes_before_tiflash_external_group_by-从-v700-版本开始引入)、[`tidb_max_bytes_before_tiflash_external_sort`](/system-variables.md#tidb_max_bytes_before_tiflash_external_sort-从-v700-版本开始引入)、[`tidb_max_bytes_before_tiflash_external_join`](/system-variables.md#tidb_max_bytes_before_tiflash_external_join-从-v700-版本开始引入),控制对应算子的最大内存使用量。当算子使用内存超过一定阈值时,会自动将数据落盘,牺牲一定的性能,从而处理更多数据。 + + 更多信息,请参考[用户文档](/tiflash/tiflash-spill-disk.md)。 + +* 提升统计信息的收集效率 [#41930](https://github.com/pingcap/tidb/issues/41930) @[xuyifangreeneyes](https://github.com/xuyifangreeneyes) + + 在 v7.0.0 中,TiDB 进一步优化了统计信息收集的逻辑,收集时间降低了约 25%。这一优化提升了中大型数据库集群的运行效率和稳定性,减少了统计信息收集对集群性能的影响。 + +* 新增优化器 Hint 对 MPP 进行干预 [#39710](https://github.com/pingcap/tidb/issues/39710) @[Reminiscent](https://github.com/Reminiscent) + + TiDB 在 v7.0.0 中增加了一系列优化器 Hint,来影响 MPP 操作执行计划的生成。 + + - [`SHUFFLE_JOIN()`](/optimizer-hints.md#shuffle_joint1_name--tl_name-):针对 MPP 生效。提示优化器对指定表使用 Shuffle Join 算法。 + - [`BROADCAST_JOIN()`](/optimizer-hints.md#broadcast_joint1_name--tl_name-):针对 MPP 生效。提示优化器对指定表使用 Broadcast Join 算法。 + - [`MPP_1PHASE_AGG()`](/optimizer-hints.md#mpp_1phase_agg):针对 MPP 生效。提示优化器对指定查询块中所有聚合函数使用一阶段聚合算法。 + - [`MPP_2PHASE_AGG()`](/optimizer-hints.md#mpp_2phase_agg):针对 MPP 生效。提示优化器对指定查询块中所有聚合函数使用二阶段聚合算法。 + + MPP 优化器 Hint 能够协助你干预 HTAP 查询,提升 HTAP 负载下的性能和稳定性。 + + 更多信息,请参考[用户文档](/optimizer-hints.md)。 + +* 优化器 Hint 可兼容指定连接方式与连接顺序 [#36600](https://github.com/pingcap/tidb/issues/36600) @[Reminiscent](https://github.com/Reminiscent) + + 在 v7.0.0 中,优化器 Hint [`LEADING()`](/optimizer-hints.md#leadingt1_name--tl_name-) 能够和影响连接方式的 Hint 配合使用,两者行为兼容。在多表连接的情况下,可以有效指定最佳的连接方式和连接顺序,提升优化器 Hint 对执行计划的控制能力。 + + 新的 Hint 行为会有微小的变化。为确保向前兼容,TiDB 引入了变量 [`tidb_opt_advanced_join_hint`](/system-variables.md#tidb_opt_advanced_join_hint-从-v700-版本开始引入)。当此变量为 `OFF` 时,行为向前兼容。从旧版本升级到 v7.0.0 及之后版本的集群,该变量会被设置成 `OFF`。为了获取更灵活的 Hint 行为,强烈建议在确保无性能回退的情况下,将该变量切换为 `ON`。 + + 更多信息,请参考[用户文档](/optimizer-hints.md)。 + +### 高可用 + +* TiDB 支持 `prefer-leader` 选项,在网络不稳定的情况下提供更高的读可用性,降低响应延迟 [#40905](https://github.com/pingcap/tidb/issues/40905) @[LykxSassinator](https://github.com/LykxSassinator) + + 你可以通过系统变量 [`tidb_replica_read`](/system-variables.md#tidb_replica_read-从-v40-版本开始引入) 控制 TiDB 的数据读取行为。在 v7.0.0 中,该变量新增 `prefer-leader` 选项。当设置为 `prefer-leader` 时,TiDB 会优先选择 leader 副本执行读取操作。当 leader 副本的处理速度明显变慢时,例如由于磁盘或网络性能抖动,TiDB 将选择其他可用的 follower 副本来执行读取操作,从而提高可用性并降低响应延迟。 + + 更多信息,请参考[用户文档](/develop/dev-guide-use-follower-read.md)。 + +### SQL 功能 + +* Time to live (TTL) 已基本可用 (GA) [#39262](https://github.com/pingcap/tidb/issues/39262) @[lcwangchao](https://github.com/lcwangchao) @[YangKeao](https://github.com/YangKeao) + + TTL 提供了行级别的生命周期控制策略。在 TiDB 中,设置了 TTL 属性的表会根据配置自动检查并删除过期的行数据。TTL 的目标是帮助用户周期性且及时地清理不需要的数据,并尽量减少对用户负载的影响。 + + 更多信息,请参考[用户文档](/time-to-live.md)。 + +* 支持 `ALTER TABLE ... REORGANIZE PARTITION` [#15000](https://github.com/pingcap/tidb/issues/15000) @[mjonss](https://github.com/mjonss) + + TiDB 支持 `ALTER TABLE... REORGANIZE PARTITION` 语法。通过该语法,你可以对表的部分或所有分区进行重新组织,包括合并、拆分、或者其他修改,并且不丢失数据。 + + 更多信息,请参考[用户文档](/partitioned-table.md#重组分区)。 + +* 支持 Key 分区 [#41364](https://github.com/pingcap/tidb/issues/41364) @[TonsnakeLin](https://github.com/TonsnakeLin) + + TiDB 支持 Key 分区。Key 分区与 Hash 分区都可以保证将数据均匀地分散到一定数量的分区里面,区别是 Hash 分区只能根据一个指定的整数表达式或字段进行分区,而 Key 分区可以根据字段列表进行分区,且 Key 分区的分区字段不局限于整数类型。 + + 更多信息,请参考[用户文档](/partitioned-table.md#key-分区)。 + +### 数据库管理 + +* TiCDC 支持同步变更数据至存储服务 (GA) [#6797](https://github.com/pingcap/tiflow/issues/6797) @[zhaoxinyu](https://github.com/zhaoxinyu) + + TiCDC 支持将变更数据同步到兼容 Amazon S3 协议的存储服务、GCS、Azure Blob Storage 以及 NFS 中。存储服务价格便宜,使用方便。对于不使用 Kafka 的用户,可以选择同步变更数据到存储服务。使用该功能,TiCDC 会将变更数据保存到文件,发送到存储服务中。用户自研的消费程序可以定时从存储服务读取新产生的变更数据进行数据处理。目前,TiCDC 支持将格式为 canal-json 和 CSV 的变更数据同步至存储服务。 + + 更多信息,请参考[用户文档](/ticdc/ticdc-sink-to-cloud-storage.md)。 + +* TiCDC OpenAPI v2 [#8019](https://github.com/pingcap/tiflow/issues/8019) @[sdojjy](https://github.com/sdojjy) + + TiCDC 提供 OpenAPI v2。相比 OpenAPI v1,OpenAPI v2 提供了更完整的同步任务支持。OpenAPI 提供的功能是 [`cdc cli` 工具](/ticdc/ticdc-manage-changefeed.md)的一个子集。你可以通过 OpenAPI v2 对 TiCDC 集群进行查询和运维操作,如获取 TiCDC 节点状态、检查集群健康状态、管理同步任务等。 + + 更多信息,请参考[用户文档](/ticdc/ticdc-open-api-v2.md)。 + +* [DBeaver](https://dbeaver.io/) v23.0.1 默认支持 TiDB [#17396](https://github.com/dbeaver/dbeaver/issues/17396) @[Icemap](https://github.com/Icemap) + + - 提供独立的 TiDB 模块、Icon 和标识。 + - 默认配置支持 [TiDB Cloud Serverless Tier](https://docs.pingcap.com/tidbcloud/select-cluster-tier#serverless-tier-beta),你可以更方便地连接 Serverless Tier。 + - 支持识别 TiDB 版本,从而显示或隐藏外键 Tab。 + - 支持 Explain SQL 计划显示。 + - 支持 TiDB 语法高亮,如 `PESSIMISTIC`、`OPTIMISTIC`、`AUTO_RANDOM`、`PLACEMENT`、`POLICY`、`REORGANIZE`、`EXCHANGE`、`CACHE`、`NONCLUSTERED`、`CLUSTERED` 等。 + - 支持 TiDB 函数高亮,如 `TIDB_BOUNDED_STALENESS`、`TIDB_DECODE_KEY`、`TIDB_DECODE_PLAN`、`TIDB_IS_DDL_OWNER`、`TIDB_PARSE_TSO`、`TIDB_VERSION`、`TIDB_DECODE_SQL_DIGESTS`、`TIDB_SHARD` 等。 + + 更多信息,请参考 [DBeaver 用户文档](https://github.com/dbeaver/dbeaver/wiki)。 + +### 数据迁移 + +* `LOAD DATA` 语句集成 TiDB Lightning,你可以使用 `LOAD DATA` 语句完成原先需要使用 TiDB Lightning 才能完成的数据导入任务(实验特性)[#40499](https://github.com/pingcap/tidb/issues/40499) @[lance6716](https://github.com/lance6716) + + 在集成 TiDB Lightning 之前,`LOAD DATA` 语句只能用于导入客户端的数据文件,如果你需要从云存储导入数据,不得不借助 TiDB Lightning 来实现。但是单独部署 TiDB Lightning 又会带来额外的部署成本和管理成本。将 TiDB Lightning 逻辑导入能力 (Logical Import Mode) 集成到 `LOAD DATA` 语句后,不仅可以省去 TiDB Lightning 的部署和管理成本,还可以借助 TiDB Lightning 的功能极大扩展 `LOAD DATA` 语句的能力。部分扩展的功能举例说明如下: + + - 支持从 Amazon S3 和 Google Cloud Storage 导入数据到 TiDB,且支持使用通配符一次性匹配多个源文件导入到 TiDB。 + - 支持 `DEFINED NULL BY` 来定义 null。 + - 支持 CSV、TSV、Parquet、SQL (mydumper/dumpling) 格式的源文件。 + - 支持将任务设置为 `Detached`,让任务在后台执行。 + - 支持任务管理,可通过 `SHOW LOAD DATA jobid` 查询任务状态和进展详情,方便管理和维护。 + + 更多信息,请参考[用户文档](/sql-statements/sql-statement-load-data.md)。 + +* TiDB Lightning 向 TiKV 传输键值对时支持启用压缩传输 [#41163](https://github.com/pingcap/tidb/issues/41163) @[gozssky](https://github.com/gozssky) + + 自 v7.0.0 起,TiDB Lightning 正式支持将本地编码排序后的键值对在网络传输时进行压缩再发送到 TiKV,从而减少网络传输的数据量,降低 50% ~ 80% 网络带宽开销。在 v6.6.0 版本之前不支持该功能,在数据量较大的情况下,TiDB Lightning 对网络带宽要求相对较高,且会产生较高的流量费。相比 v6.6.0, v7.0.0 优化了压缩算法,能以更快的速度将数据导入到 TiKV 中。同样是开启压缩选项,v6.6.0 会增加 2 倍导入时间,而 v7.0.0 只会增加大约 60% 时间。以上的压缩率和导入时长仅供参考,不同的使用场景会有差异。 + + 该功能默认关闭,你可以通过将 TiDB Lightning 配置项 `compress-kv-pairs` 设置为 `"gzip"` 或者 `"gz"` 开启此功能。 + + 更多信息,请参考[用户文档](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-任务配置)。 + +## 兼容性变更 + +> **注意:** +> +> 以下为从 v6.6.0 升级至当前版本 (v7.0.0) 所需兼容性变更信息。如果从 v6.5.0 或之前版本升级到当前版本,可能也需要考虑和查看中间版本 release notes 中提到的兼容性变更信息。 + +### MySQL 兼容性 + +* TiDB 移除了自增列必须是索引的约束 [#40580](https://github.com/pingcap/tidb/issues/40580) @[tiancaiamao](https://github.com/tiancaiamao) + + 在 v7.0.0 之前,TiDB 自增列的行为与 MySQL 一致,要求自增列必须是索引或索引前缀。自 TiDB v7.0.0 起,TiDB 移除了自增列必须是索引或索引前缀的限制。这意味着用户现在可以更灵活地定义表的主键,并方便地使用自增列实现排序和分页,同时避免自增列带来的写入热点问题,并通过使用聚簇索引表提升查询性能。现在,你可以使用以下语法创建表: + + ```sql + CREATE TABLE test1 ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `k` int(11) NOT NULL DEFAULT '0', + `c` char(120) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + PRIMARY KEY(`k`, `id`) + ); + ``` + + 此功能不影响 TiCDC 同步数据。 + + 更多信息,请参考[用户文档](/mysql-compatibility.md#自增-id)。 + +* TiDB 支持 Key 分区类型,如下所示。 + + ```sql + CREATE TABLE employees ( + id INT NOT NULL, + fname VARCHAR(30), + lname VARCHAR(30), + hired DATE NOT NULL DEFAULT '1970-01-01', + separated DATE DEFAULT '9999-12-31', + job_code INT, + store_id INT) PARTITION BY KEY(store_id) PARTITIONS 4; + ``` + + 自 TiDB v7.0.0 起,TiDB 支持 Key 分区,并支持解析 MySQL 的 `PARTITION BY LINEAR KEY` 语法,但会忽略其中的 `LINEAR` 关键字,只采用非线性 Hash 算法。Key 分区类型暂不支持分区字段列表为空的语句。 + + 更多信息,请参考[用户文档](/partitioned-table.md#key-分区)。 + +### 行为变更 + +* TiCDC 修复了 Avro 编码 `FLOAT` 类型数据错误的问题 [#8490](https://github.com/pingcap/tiflow/issues/8490) @[3AceShowHand](https://github.com/3AceShowHand) + + 在升级 TiCDC 集群到 v7.0.0 时,如果使用 Avro 同步的表包含 `FLOAT` 类型数据,请在升级前手动调整 Confluent Schema Registry 的兼容性策略为 `None`,使 changefeed 能够成功更新 schema。否则,在升级之后 changefeed 将无法更新 schema 并进入错误状态。 + +* [`LOAD DATA` SQL 语句](/sql-statements/sql-statement-load-data.md)在 v7.0.0 中新增参数 `batch_size` 来实现事务的拆分。`batch_size` 参数默认值为 `1000`,表示将待导入 TiDB 的数据拆分成多个事务提交,每一个事务插入 1000 行记录到 TiDB。在 v7.0.0 以前控制事务拆分的参数为 [`tidb_dml_batch_size`](/system-variables.md#tidb_dml_batch_size),自 v7.0.0 起不再生效。 + +### 系统变量 + +| 变量名 | 修改类型 | 描述 | +|--------|--|------| +| `tidb_pessimistic_txn_aggressive_locking` | 删除 | 更名为 [`tidb_pessimistic_txn_fair_locking`](/system-variables.md#tidb_pessimistic_txn_fair_locking-从-v700-版本开始引入)。| +| [`tidb_enable_non_prepared_plan_cache`](/system-variables.md#tidb_enable_non_prepared_plan_cache) | 修改 | 该变量从 v7.0.0 开始生效,用来控制是否开启[非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 | +| [`tidb_enable_null_aware_anti_join`](/system-variables.md#tidb_enable_null_aware_anti_join-从-v630-版本开始引入) | 修改 | 经进一步的测试后,该变量默认值从 `OFF` 修改为 `ON`,表示 TiDB 默认开启对特殊集合算子 `NOT IN` 和 `!= ALL` 引导的子查询产生的 Anti Join 采用 Null-Aware Hash Join 的执行方式。 | +| [`tidb_enable_resource_control`](/system-variables.md#tidb_enable_resource_control-从-v660-版本开始引入) | 修改 | 该变量默认值从 `OFF` 修改为 `ON`,表示默认开启集群按照资源组做资源隔离。资源管控功能在 v7.0.0 默认开启,便于你随时使用此功能。 | +| [`tidb_non_prepared_plan_cache_size`](/system-variables.md#tidb_non_prepared_plan_cache_size) | 修改 | 该变量从 v7.0.0 开始生效,用来控制[非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)最多能够缓存的计划数量。 | +| [`tidb_rc_read_check_ts`](/system-variables.md#tidb_rc_read_check_ts-从-v600-版本开始引入) | 修改 | 从 v7.0.0 开始,该变量对于使用 Prepared Statement 协议下 cursor fetch read 游标模式不再生效。 | +| [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 新增 | 该变量用于控制当内表上有 `Selection`/`Projection` 算子时是否支持 Index Join。 | +| [`tidb_enable_plan_cache_for_subquery`](/system-variables.md#tidb_enable_plan_cache_for_subquery-从-v700-版本开始引入) | 新增 | 该变量用于控制 Prepared Plan Cache 是否缓存包含子查询的查询。 | +| [`tidb_enable_plan_replayer_continuous_capture`](/system-variables.md#tidb_enable_plan_replayer_continuous_capture-从-v700-版本开始引入) | 新增 | 这个变量用来控制是否开启 [`PLAN REPLAYER CONTINUOUS CAPTURE`](/sql-plan-replayer.md#使用-plan-replayer-continuous-capture) 功能。默认值 `OFF` 代表关闭功能。 | +| [`tidb_load_based_replica_read_threshold`](/system-variables.md#tidb_load_based_replica_read_threshold-从-v700-版本开始引入) | 新增 | 该变量用于设置基于负载的 replica read 的触发阈值。在 v7.0.0,该变量控制的功能尚未完全生效,请保留默认值。 | +|[`tidb_opt_advanced_join_hint`](/system-variables.md#tidb_opt_advanced_join_hint-从-v700-版本开始引入) | 新增 | 这个变量用来控制用于控制连接算法的 Join Method Hint 是否会影响 Join Reorder 的优化过程。默认值为 `ON`,即采用新的兼容控制模式;`OFF` 则与 v7.0.0 以前的行为保持一致。为了向前兼容,从旧版本升级到 v7.0.0 及之后版本的集群,该变量会被设置成 `OFF`。| +| [`tidb_opt_derive_topn`](/system-variables.md#tidb_opt_derive_topn-从-v700-版本开始引入) | 新增 | 这个变量用来控制是否开启[从窗口函数中推导 TopN 或 Limit](/derive-topn-from-window.md) 的优化规则。默认值为 `OFF`,即未开启该优化规则。| +| [`tidb_opt_enable_late_materialization`](/system-variables.md#tidb_opt_enable_late_materialization-从-v700-版本开始引入) | 新增 | 这个变量用来控制是否启用 [TiFlash 延迟物化](/tiflash/tiflash-late-materialization.md)功能。默认值为 `OFF`,即未开启 TiFlash 延迟物化功能。| +| [`tidb_opt_ordering_index_selectivity_threshold`](/system-variables.md#tidb_opt_ordering_index_selectivity_threshold-从-v700-版本开始引入) | 新增 | 该变量用于当 SQL 中存在 `ORDER BY` 和 `LIMIT` 子句且带有过滤条件时,控制优化器选择索引的行为。 | +|[`tidb_pessimistic_txn_fair_locking`](/system-variables.md#tidb_pessimistic_txn_fair_locking-从-v700-版本开始引入) | 新增 | 是否对悲观锁启用加强的悲观锁唤醒模型,以降低单行冲突场景下事务的尾延迟。默认值为 `ON`,从旧版本升级到 v7.0.0 或之后版本,该变量会被设置成 `OFF`。 | +| [`tidb_ttl_running_tasks`](/system-variables.md#tidb_ttl_running_tasks-从-v700-版本开始引入) | 新增 | 这个变量用于限制整个集群内 TTL 任务的并发量。默认值 `-1` 表示与 TiKV 节点的数量相同。 | + +### 配置文件参数 + +| 配置文件 | 配置项 | 修改类型 | 描述 | +| -------- | -------- | -------- | -------- | +| TiKV | `server.snap-max-write-bytes-per-sec` | 删除 | 更名为 [`server.snap-io-max-bytes-per-sec`](/tikv-configuration-file.md#snap-io-max-bytes-per-sec)。 | +| TiKV | [`raft-engine.enable-log-recycle`](/tikv-configuration-file.md#enable-log-recycle-从-v630-版本开始引入) | 修改 | 默认值由 `false` 变更为 `true`。 | +| TiKV | [`resolved-ts.advance-ts-interval`](/tikv-configuration-file.md#advance-ts-interval) | 修改 | 默认值由 `"1s"` 变更为 `"20s"`。该修改可以延长定期推进 Resolved TS 的时间间隔,从而减少 TiKV 节点之间的流量消耗。 | +| TiKV | [`resource-control.enabled`](/tikv-configuration-file.md#resource-control) | 修改 | 默认值由 `false` 变更为 `true`。 | +| TiKV | [`raft-engine.prefill-for-recycle`](/tikv-configuration-file.md#prefill-for-recycle-从-v700-版本开始引入) | 新增 | 控制 Raft Engine 是否自动生成空的日志文件用于日志回收。默认值为 `false`。| +| PD | [`degraded-mode-wait-duration`](/pd-configuration-file.md#degraded-mode-wait-duration) | 新增 | PD 中内置的 [Resource Control](/tidb-resource-control.md) 相关配置项。用于配置触发降级模式需要等待的时间。默认值为 `"0s"`。| +| PD | [`read-base-cost`](/pd-configuration-file.md#read-base-cost) | 新增 | PD 中内置的 [Resource Control](/tidb-resource-control.md) 相关配置项。用于设置每次读请求转换成 RU 的基准系数。默认值为 `0.25`。 | +| PD | [`read-cost-per-byte`](/pd-configuration-file.md#read-cost-per-byte) | 新增 | PD 中内置的 [Resource Control](/tidb-resource-control.md) 相关配置项。用于设置读流量转换成 RU 的基准系数。默认值为 `1/(64 * 1024)`。 | +| PD | [`read-cpu-ms-cost`](/pd-configuration-file.md#read-cpu-ms-cost) | 新增 | PD 中内置的 [Resource Control](/tidb-resource-control.md) 相关配置项。用于设置 CPU 转换成 RU 的基准系数。默认值为 `1/3`。 | +| PD | [`write-base-cost`](/pd-configuration-file.md#write-base-cost) | 新增 | PD 中内置的 [Resource Control](/tidb-resource-control.md) 相关配置项。用于设置每次写请求转换成 RU 的基准系数。默认值为 `1`。 | +| PD | [`write-cost-per-byte`](/pd-configuration-file.md#write-cost-per-byte) | 新增 | PD 中内置的 [Resource Control](/tidb-resource-control.md) 相关配置项。用于设置写流量转换成 RU 的基准系数。默认值为 `1/1024`。 | +| TiFlash | [`flash.disaggregated_mode`](/tiflash/tiflash-disaggregated-and-s3.md) | 新增 | 在 TiFlash 的存算分离架构中,表示此 TiFlash 节点是 Write Node 还是 Compute Node。可选值为 `tiflash_write` 或者 `tiflash_compute`。 | +| TiFlash | [`storage.s3.endpoint`](/tiflash/tiflash-disaggregated-and-s3.md) | 新增 | S3 的 endpoint 地址。 | +| TiFlash | [`storage.s3.bucket`](/tiflash/tiflash-disaggregated-and-s3.md) | 新增 | TiFlash 的所有数据存储的 bucket。 | +| TiFlash | [`storage.s3.root`](/tiflash/tiflash-disaggregated-and-s3.md) | 新增 | S3 bucket 中数据存储的根目录。 | +| TiFlash | [`storage.s3.access_key_id`](/tiflash/tiflash-disaggregated-and-s3.md) | 新增 | 访问 S3 的 ACCESS_KEY_ID。 | +| TiFlash | [`storage.s3.secret_access_key`](/tiflash/tiflash-disaggregated-and-s3.md) | 新增 | 访问 S3 的 SECRET_ACCESS_KEY。 | +| TiFlash | [`storage.remote.cache.dir`](/tiflash/tiflash-disaggregated-and-s3.md) | 新增 | TiFlash Compute Node 的本地数据缓存目录。 | +| TiFlash | [`storage.remote.cache.capacity`](/tiflash/tiflash-disaggregated-and-s3.md) | 新增 | TiFlash Compute Node 的本地数据缓存目录的大小。 | +| TiDB Lightning | [`add-index-by-sql`](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-任务配置) | 新增 | 控制 Physical Import Mode 是否通过 SQL 方式添加索引。默认为 `false`,表示 TiDB Lightning 会将行数据以及索引数据都编码成 KV pairs 后一同导入 TiKV,实现机制和历史版本保持一致。通过 SQL 方式添加索引的优点是将导入数据与导入索引分开,可以快速导入数据,即使导入数据后,索引添加失败,也不会影响数据的一致性。 | +| TiCDC | [`enable-table-across-nodes`](/ticdc/ticdc-changefeed-config.md#ticdc-changefeed-配置文件说明) | 新增 | 将表按 Region 个数划分成多个同步范围,这些范围可由多个 TiCDC 节点同步。 | +| TiCDC | [`region-threshold`](/ticdc/ticdc-changefeed-config.md#ticdc-changefeed-配置文件说明) | 新增 | 开启了 `enable-table-across-nodes` 后,该功能只对 Region 个数大于 `region-threshold` 值的表生效。 | +| DM | [`analyze`](/dm/task-configuration-file-full.md#完整配置文件示例) | 新增 | 配置是否在 CHECKSUM 结束后对所有表逐个执行 `ANALYZE TABLE ` 操作,可配置 `"required"`/`"optional"`/`"off"`。默认为 `"optional"`。| +| DM | [`range-concurrency`](/dm/task-configuration-file-full.md#完整配置文件示例) | 新增 | 配置 dm-worker 向 TiKV 写入 KV 数据的并发数。 | +| DM | [`compress-kv-pairs`](/dm/task-configuration-file-full.md#完整配置文件示例) | 新增 | 配置 dm-worker 向 TiKV 发送 KV 数据时是否启用压缩,可配置 `"gzip"`,默认为空表示不压缩。 | +| DM | [`pd-addr`](/dm/task-configuration-file-full.md#完整配置文件示例) | 新增 | 配置 Physical Import 时连接下游 PD server 的地址,填一个或多个均可。配置项为空时,默认使用 TiDB 中查询到的 PD 地址信息。 | + +## 改进提升 + ++ TiDB + + - 引入 `EXPAND` 算子辅助优化单个 `SELECT` 中包含多个 `DISTINCT` 的 SQL 性能 [#16581](https://github.com/pingcap/tidb/issues/16581) @[AilinKid](https://github.com/AilinKid) + - Index Join 支持更多的 SQL 格式 [#40505](https://github.com/pingcap/tidb/issues/40505) @[Yisaer](https://github.com/Yisaer) + - 避免某些情况下分区表数据需要在 TiDB 全局排序 [#26166](https://github.com/pingcap/tidb/issues/26166) @[Defined2014](https://github.com/Defined2014) + - 支持同时使用 `fair lock mode` 和 `lock only if exists` 功能 [#42068](https://github.com/pingcap/tidb/issues/42068) @[MyonKeminta](https://github.com/MyonKeminta) + - 支持打印事务慢日志以及相关事务内部事件 [#41863](https://github.com/pingcap/tidb/issues/41863) @[ekexium](https://github.com/ekexium) + ++ PD + + - 新增监控指标以展示 store limit 限制导致的调度生成失败 [#6043](https://github.com/tikv/pd/issues/6043) @[nolouch](https://github.com/nolouch) + ++ TiFlash + + - 减少 TiFlash 在写路径上的内存使用量 [#7144](https://github.com/pingcap/tiflash/issues/7144) @[hongyunyan](https://github.com/hongyunyan) + - 减少 TiFlash 在有较多表的情况下的重启时间 [#7146](https://github.com/pingcap/tiflash/issues/7146) @[hongyunyan](https://github.com/hongyunyan) + ++ Tools + + + TiCDC + + - 支持在 Kafka 为下游的场景中将单个大表的数据变更分布到多个 TiCDC 节点,从而解决大规模 TiDB 集群的数据集成场景下单表扩展性的问题 [#8247](https://github.com/pingcap/tiflow/issues/8247) @[overvenus](https://github.com/overvenus) + + 你可以通过设置 TiCDC 配置项 `enable_table_across_nodes` 为 `true` 来启用这个功能,并通过设置 `region_threshold` 来指定当一张表的 region 个数超过阀值时,TiCDC 开始将对应的表上的数据变更分布到多个 TiCDC 节点。 + + - 支持在 redo applier 中拆分事务以提升 apply 吞吐,降低灾难场景的 RTO [#8318](https://github.com/pingcap/tiflow/issues/8318) @[CharlesCheung96](https://github.com/CharlesCheung96) + - 改进表的调度策略,可以将单个表更均匀地拆分到各个 TiCDC 节点上 [#8247](https://github.com/pingcap/tiflow/issues/8247) @[overvenus](https://github.com/overvenus) + - 在 MQ sink 中添加了 Large Row 监控指标 [#8286](https://github.com/pingcap/tiflow/issues/8286) @[hi-rustin](https://github.com/hi-rustin) + - 在一个 Region 包含多个表的数据的场景下,减少了 TiKV 与 TiCDC 节点间的网络流量 [#6346](https://github.com/pingcap/tiflow/issues/6346) @[overvenus](https://github.com/overvenus) + - 将 Checkpoint TS 和 Resolved TS 的 P99 指标的面板移动到 Lag analyze 面板 [#8524](https://github.com/pingcap/tiflow/issues/8524) @[hi-rustin](https://github.com/hi-rustin) + - 支持在 redo log 里 apply DDL 事件 [#8361](https://github.com/pingcap/tiflow/issues/8361) @[CharlesCheung96](https://github.com/CharlesCheung96) + - 支持根据上游写入吞吐来拆分调度表到 TiCDC 节点 [#7720](https://github.com/pingcap/tiflow/issues/7720) @[overvenus](https://github.com/overvenus) + + + TiDB Lightning + + - TiDB Lightning 的物理导入模式 (Physical Import Mode) 支持导入数据和索引分离导入,提升导入速度和稳定性 [#42132](https://github.com/pingcap/tidb/issues/42132) @[gozssky](https://github.com/gozssky) + + TiDB Lightning 增加 `add-index-by-sql` 参数。默认值为 `false`,表示仍然会用 TiDB Lightning 将行数据以及索引数据编码成 KV pairs 后再一同导入到 TiKV。如果设置为 `true`,表示在物理导入模式 (Physical Import Mode) 下,会在导入数据完成后,通过 `ADD INDEX` 的 SQL 语句帮你建索引,提升导入数据的速度和稳定性。 + + - TiDB Lightning 增加 `tikv-importer.keyspace-name` 参数。默认值为空字符串,表示 TiDB Lightning 会去自动获取这次导入对应的 keyspace 名字。如果指定了值,那么使用指定的 keyspace 名字来导入。这个参数使得 TiDB Lightning 导入多租户的 TiDB 集群场景下可以进行灵活配置。[#41915](https://github.com/pingcap/tidb/issues/41915) @[lichunzhu](https://github.com/lichunzhu) + +## 错误修复 + ++ TiDB + + - 修复 TiDB 从 v6.5.1 升级到新版本时遗漏部分更新的问题 [#41502](https://github.com/pingcap/tidb/issues/41502) @[chrysan](https://github.com/chrysan) + - 修复部分系统变量升级后默认值没有修改的问题 [#41423](https://github.com/pingcap/tidb/issues/41423) @[crazycs520](https://github.com/crazycs520) + - 修复加索引相关 Coprocessor 请求类型显示为 unknown 的问题 [#41400](https://github.com/pingcap/tidb/issues/41400) @[tangenta](https://github.com/tangenta) + - 修复加索引时报 `PessimisticLockNotFound` 错误的问题 [#41515](https://github.com/pingcap/tidb/issues/41515) @[tangenta](https://github.com/tangenta) + - 修复加唯一索引时误报 `found duplicate key` 错误的问题 [#41630](https://github.com/pingcap/tidb/issues/41630) @[tangenta](https://github.com/tangenta) + - 修复加索引时 panic 的问题 [#41880](https://github.com/pingcap/tidb/issues/41880) @[tangenta](https://github.com/tangenta) + - 修复 TiFlash 执行中遇到生成列会报错的问题 [#40663](https://github.com/pingcap/tidb/issues/40663) @[guo-shaoge](https://github.com/guo-shaoge) + - 修复当存在时间类型时,TiDB 可能无法正确获取统计信息的问题 [#41938](https://github.com/pingcap/tidb/issues/41938) @[xuyifangreeneyes](https://github.com/xuyifangreeneyes) + - 修复在开启 Prepared Plan Cache 的情况下,索引全表扫可能会报错的问题 [#42150](https://github.com/pingcap/tidb/issues/42150) @[fzzf678](https://github.com/fzzf678) + - 修复 `IFNULL(NOT NULL COLUMN, ...)` 可能返回错误结果的问题 [#41734](https://github.com/pingcap/tidb/issues/41734) @[LittleFall](https://github.com/LittleFall) + - 修复当分区表的所有数据落在单个 Region 时,TiDB 可能执行得到错误结果的问题 [#41801](https://github.com/pingcap/tidb/issues/41801) @[Defined2014](https://github.com/Defined2014) + - 修复当同一个 SQL 中出现多个不同的分区表时,TiDB 可能执行得到错误结果的问题 [#42135](https://github.com/pingcap/tidb/issues/42135) @[mjonss](https://github.com/mjonss) + - 修复在为分区表添加新的索引之后,该分区表可能无法正确触发统计信息的自动收集的问题 [#41638](https://github.com/pingcap/tidb/issues/41638) @[xuyifangreeneyes](https://github.com/xuyifangreeneyes) + - 修复在连续两次收集统计信息后,TiDB 可能读取到错误的列统计信息的问题 [#42073](https://github.com/pingcap/tidb/issues/42073) @[xuyifangreeneyes](https://github.com/xuyifangreeneyes) + - 修复在开启 Prepared Plan Cache 时 Index Merge 可能得到错误结果的问题 [#41828](https://github.com/pingcap/tidb/issues/41828) @[qw4990](https://github.com/qw4990) + - 修复 IndexMerge 中 goroutine 泄露的问题 [#41605](https://github.com/pingcap/tidb/issues/41605) @[guo-shaoge](https://github.com/guo-shaoge) + - 修复非 `BIGINT` 类型的无符号整数与 `STRING`/`DECIMAL` 比较时可能出现错误结果的问题 [#41736](https://github.com/pingcap/tidb/issues/41736) @[LittleFall](https://github.com/LittleFall) + - 修复 `ANALYZE` 语句可能会因为当前 session 的前一个 `ANALYZE` 语句因为内存超限被 kill 导致当前 `ANALYZE` 语句也被 kill 的问题 [#41825](https://github.com/pingcap/tidb/issues/41825) @[XuHuaiyu](https://github.com/XuHuaiyu) + - 修复 batch coprocessor 搜集信息过程中存在的数据竞争问题 [#41412](https://github.com/pingcap/tidb/issues/41412) @[you06](https://github.com/you06) + - 修复 assertion 错误导致无法为分区表打印 MVCC 信息的问题 [#40629](https://github.com/pingcap/tidb/issues/40629) @[ekexium](https://github.com/ekexium) + - 修复 `fair lock mode` 对不存在的 key 加锁处理的问题 [#41527](https://github.com/pingcap/tidb/issues/41527) @[ekexium](https://github.com/ekexium) + - 修复 `INSERT IGNORE` 和 `REPLACE` 语句对不修改 value 的 key 没有加锁的问题 [#42121](https://github.com/pingcap/tidb/issues/42121) @[zyguan](https://github.com/zyguan) + ++ PD + + - 修复了 Scatter Region 操作后 leader 分布不均衡的问题 [#6017](https://github.com/tikv/pd/issues/6017) @[HunDunDM](https://github.com/HunDunDM) + - 修复了启动过程中获取 PD 成员时的数据竞争问题 [#6069](https://github.com/tikv/pd/issues/6069) @[rleungx](https://github.com/rleungx) + - 修复了热点统计信息中的数据竞争问题 [#6069](https://github.com/tikv/pd/issues/6069) @[lhy1024](https://github.com/lhy1024) + - 修复了切换 Placement Rule 时可能存在的 leader 分布不均衡的问题 [#6195](https://github.com/tikv/pd/issues/6195) @[bufferflies](https://github.com/bufferflies) + ++ TiFlash + + - 修复了 Decimal 除法在某些情况下最后一位未进位的问题 [#7022](https://github.com/pingcap/tiflash/issues/7022) @[LittleFall](https://github.com/LittleFall) + - 修复了 Decimal 转换在某些情况下进位错误的问题 [#6994](https://github.com/pingcap/tiflash/issues/6994) @[windtalker](https://github.com/windtalker) + - 修复了开启 new collation 后 TopN/Sort 算子结果可能出错的问题 [#6807](https://github.com/pingcap/tiflash/issues/6807) @[xzhangxian1008](https://github.com/xzhangxian1008) + - 修复了单个 TiFlash 节点聚合结果集过大(超过 1200 万)时可能会导致 TiFlash 报错的问题 [#6993](https://github.com/pingcap/tiflash/issues/6993) @[windtalker](https://github.com/windtalker) + ++ Tools + + + Backup & Restore (BR) + + - 修复了在 PITR 恢复过程中等待 split Region 重试的时间不足的问题 [#42001](https://github.com/pingcap/tidb/issues/42001) @[joccau](https://github.com/joccau) + - 修复了在 PITR 恢复过程遇到 `memory is limited` 错误导致恢复失败的问题 [#41983](https://github.com/pingcap/tidb/issues/41983) @[joccau](https://github.com/joccau) + - 修复了 PD 节点宕机可能导致 PITR 日志备份进度不推进的问题 [#14184](https://github.com/tikv/tikv/issues/14184) @[YuJuncen](https://github.com/YuJuncen) + - 缓解了 Region leadership 迁移导致 PITR 日志备份进度延迟变高的问题 [#13638](https://github.com/tikv/tikv/issues/13638) @[YuJuncen](https://github.com/YuJuncen) + + + TiCDC + + - 修复了重启 changefeed 可能导致数据丢失或者 checkpoint 无法推进的问题 [#8242](https://github.com/pingcap/tiflow/issues/8242) @[overvenus](https://github.com/overvenus) + - 修复了 DDL sink 出现的数据竞争问题 [#8238](https://github.com/pingcap/tiflow/issues/8238) @[3AceShowHand](https://github.com/3AceShowHand) + - 修复了状态为 `stopped` 的 changefeed 可能会自动重启的问题 [#8330](https://github.com/pingcap/tiflow/issues/8330) @[sdojjy](https://github.com/sdojjy) + - 修复了当所有 Kafka server 不可访问时会导致 TiCDC server panic 的问题 [#8523](https://github.com/pingcap/tiflow/issues/8523) @[3AceShowHand](https://github.com/3AceShowHand) + - 修复了下游为 MySQL 且执行语句和 TiDB 行为不兼容时可能导致数据丢失的问题 [#8453](https://github.com/pingcap/tiflow/issues/8453) @[asddongmen](https://github.com/asddongmen) + - 修复了 rolling upgrade 可能导致 TiCDC OOM 或者 checkpoint 卡住的问题 [#8329](https://github.com/pingcap/tiflow/issues/8329) @[overvenus](https://github.com/overvenus) + - 修复了 Kubernetes 上不能平滑升级 (graceful upgrade) TiCDC 集群的问题 [#8484](https://github.com/pingcap/tiflow/issues/8484) @[overvenus](https://github.com/overvenus) + + + TiDB Data Migration (DM) + + - 修复了 DM worker 节点使用 GCP Cloud Storage 时,由于断点续传信息记录过于频繁,达到了 GCP Cloud Storage 的请求频次上限,导致 DM worker 无法把数据写入 GCP Cloud Storage 中,从而导致全量数据加载失败的问题 [#8482](https://github.com/pingcap/tiflow/issues/8482) @[maxshuang](https://github.com/maxshuang) + - 修复了在多个导入任务同时同步同一个下游的数据,并且都使用了下游元数据表来记录断点续传信息时,所有任务的断点续传信息被写入了同一张元数据表,并且使用了相同的任务 ID 的问题 [#8500](https://github.com/pingcap/tiflow/issues/8500) @[maxshuang](https://github.com/maxshuang) + + + TiDB Lightning + + - 修复了当使用 Physical Import Mode 导入数据时,如果目标表的复合主键中存在 `auto_random` 列,但源数据中没有指定该列的值,TiDB Lightning 不能为 `auto_random` 列自动生成数据的问题 [#41454](https://github.com/pingcap/tidb/issues/41454) @[D3Hunter](https://github.com/D3Hunter) + - 修复了当使用 TiDB Lightning 的 Logical Import Mode 导入数据时,由于目标集群用户没有 `CONFIG` 权限导致导入失败的问题 [#41915](https://github.com/pingcap/tidb/issues/41915) @[lichunzhu](https://github.com/lichunzhu) + +## 贡献者 + +感谢来自 TiDB 社区的贡献者们: + +- [AntiTopQuark](https://github.com/AntiTopQuark) +- [blacktear23](https://github.com/blacktear23) +- [BornChanger](https://github.com/BornChanger) +- [Dousir9](https://github.com/Dousir9) +- [erwadba](https://github.com/erwadba) +- [HappyUncle](https://github.com/HappyUncle) +- [jiyfhust](https://github.com/jiyfhust) +- [L-maple](https://github.com/L-maple) +- [liumengya94](https://github.com/liumengya94) +- [woofyzhao](https://github.com/woofyzhao) +- [xiaguan](https://github.com/xiaguan) diff --git a/releases/release-notes.md b/releases/release-notes.md index 3eb1e1a9b712..dfb2776f845f 100644 --- a/releases/release-notes.md +++ b/releases/release-notes.md @@ -7,6 +7,10 @@ aliases: ['/docs-cn/dev/releases/release-notes/','/docs-cn/dev/releases/rn/'] TiDB 历史版本发布声明如下: +## 7.0 + +- [7.0.0-DMR](/releases/release-7.0.0.md): 2023-03-30 + ## 6.6 - [6.6.0-DMR](/releases/release-6.6.0.md): 2023-02-20 diff --git a/releases/release-timeline.md b/releases/release-timeline.md index 0349194b4217..23906465dda9 100644 --- a/releases/release-timeline.md +++ b/releases/release-timeline.md @@ -9,6 +9,7 @@ summary: 了解 TiDB 的版本发布时间线。 | 版本 | 发布日期 | | :--- | :--- | +| [7.0.0-DMR](/releases/release-7.0.0.md) | 2023-03-30 | | [6.5.1](/releases/release-6.5.1.md) | 2023-03-10 | | [6.1.5](/releases/release-6.1.5.md) | 2023-02-28 | | [6.6.0-DMR](/releases/release-6.6.0.md) | 2023-02-20 | diff --git a/resources/cdnfresh.txt b/resources/cdnfresh.txt index 94122592a3af..96f3f9d1dc6b 100644 --- a/resources/cdnfresh.txt +++ b/resources/cdnfresh.txt @@ -2,6 +2,8 @@ https://download.pingcap.org/tidb-dev-zh-manual.pdf https://download.pingcap.org/tidb-dev-en-manual.pdf https://download.pingcap.org/tidb-stable-zh-manual.pdf https://download.pingcap.org/tidb-stable-en-manual.pdf +https://download.pingcap.org/tidb-v7.0-zh-manual.pdf +https://download.pingcap.org/tidb-v7.0-en-manual.pdf https://download.pingcap.org/tidb-v6.6-zh-manual.pdf https://download.pingcap.org/tidb-v6.6-en-manual.pdf https://download.pingcap.org/tidb-v6.4-zh-manual.pdf diff --git a/scale-tidb-using-tiup.md b/scale-tidb-using-tiup.md index d2c7cfa0c80a..4b123768be8b 100644 --- a/scale-tidb-using-tiup.md +++ b/scale-tidb-using-tiup.md @@ -282,7 +282,7 @@ Starting /root/.tiup/components/cluster/v1.11.3/cluster display TiDB Cluster: -TiDB Version: v6.6.0 +TiDB Version: v7.0.0 ID Role Host Ports Status Data Dir Deploy Dir diff --git a/sql-statements/sql-statement-drop-table.md b/sql-statements/sql-statement-drop-table.md index 8fd052e44966..16d1a5c4b0e0 100644 --- a/sql-statements/sql-statement-drop-table.md +++ b/sql-statements/sql-statement-drop-table.md @@ -72,7 +72,20 @@ DROP TABLE IF EXISTS table_not_exists; ``` ``` -Query OK, 0 rows affected (0.01 sec) +Query OK, 0 rows affected, 1 warning (0.01 sec) +``` + +```sql +SHOW WARNINGS; +``` + +``` ++-------+------+---------------------------------------+ +| Level | Code | Message | ++-------+------+---------------------------------------+ +| Note | 1051 | Unknown table 'test.table_not_exists' | ++-------+------+---------------------------------------+ +1 row in set (0.01 sec) ``` {{< copyable "sql" >}} @@ -97,7 +110,6 @@ Query OK, 0 rows affected (0.23 sec) ## MySQL 兼容性 -* 在尝试删除不存在的表时,使用 `IF EXISTS` 删除表不会返回警告。[Issue #7867](https://github.com/pingcap/tidb/issues/7867) * 目前 `RESTRICT` 和 `CASCADE` 仅在语法上支持。 ## 另请参阅 diff --git a/sql-statements/sql-statement-load-data.md b/sql-statements/sql-statement-load-data.md index d9797e1b6910..009f511c87a9 100644 --- a/sql-statements/sql-statement-load-data.md +++ b/sql-statements/sql-statement-load-data.md @@ -8,6 +8,10 @@ aliases: ['/docs-cn/dev/sql-statements/sql-statement-load-data/','/docs-cn/dev/r `LOAD DATA` 语句用于将数据批量加载到 TiDB 表中。 +> **警告:** +> +> 当前该功能为实验特性,不建议在生产环境中使用。 + ## 语法图 ```ebnf+diagram diff --git a/sql-statements/sql-statement-operate-load-data-job.md b/sql-statements/sql-statement-operate-load-data-job.md index d3d061586718..80254bc1ad0e 100644 --- a/sql-statements/sql-statement-operate-load-data-job.md +++ b/sql-statements/sql-statement-operate-load-data-job.md @@ -9,6 +9,10 @@ summary: TiDB 数据库中 CANCEL LOAD DATA 和 DROP LOAD DATA 的使用概况 `DROP LOAD DATA` 语句用于删除系统中创建的 LOAD DATA 任务。 +> **警告:** +> +> 当前该功能为实验特性,不建议在生产环境中使用。 + ## 语法图 ```ebnf+diagram diff --git a/sql-statements/sql-statement-show-load-data.md b/sql-statements/sql-statement-show-load-data.md index 7e19ec61ff6b..7bb0c0db3593 100644 --- a/sql-statements/sql-statement-show-load-data.md +++ b/sql-statements/sql-statement-show-load-data.md @@ -7,6 +7,10 @@ summary: TiDB 数据库中 SHOW LOAD DATA 的使用概况。 `SHOW LOAD DATA` 语句用于显示系统中创建的 LOAD DATA 任务。该语句只能显示由当前用户创建的任务。 +> **警告:** +> +> 当前该功能为实验特性,不建议在生产环境中使用。 + ## 语法图 ```ebnf+diagram diff --git a/system-variables.md b/system-variables.md index 2d467ff8150e..e4269df999a8 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1600,6 +1600,10 @@ MPP 是 TiFlash 引擎提供的分布式计算框架,允许节点之间的数 ### `tidb_enable_resource_control` 从 v6.6.0 版本开始引入 +> **警告:** +> +> [资源管控](/tidb-resource-control.md) 目前为实验性特性,此变量定义可能在之后发生变化或者删除。 + - 作用域:GLOBAL - 是否持久化到集群:是 - 默认值:`ON` @@ -3231,7 +3235,8 @@ EXPLAIN FORMAT='brief' SELECT COUNT(1) FROM t WHERE a = 1 AND b IS NOT NULL; - 默认值:`80%` - 取值范围: - 你可以将该变量值设为百分比格式,表示内存用量占总内存的百分比,取值范围为 `[1%, 99%]`。 - - 你还可以将变量值设为内存大小,取值范围为 `[0, 9223372036854775807]`,单位为 Byte。支持带单位的内存格式 "KB|MB|GB|TB"。`0` 值表示不设内存限制。 + - 你还可以将变量值设为内存大小,取值范围为 `0` 以及 `[536870912, 9223372036854775807]`,单位为 Byte。支持带单位的内存格式 "KB|MB|GB|TB"。`0` 值表示不设内存限制。 + - 当设置的内存值小于 512 MB 且不为 0 时,TiDB 将会使用 512 MB 作为替代。 - 该变量指定 TiDB 实例的内存限制。TiDB 会在内存用量达到该限制时,对当前内存用量最高的 SQL 语句进行取消 (Cancel) 操作。在该 SQL 语句被成功 Cancel 掉后,TiDB 会尝试调用 Golang GC 立刻回收内存,以最快速度缓解内存压力。 - 只有内存使用大于 `tidb_server_memory_limit_sess_min_size` 的 SQL 语句会被选定为最优先被 Cancel 的 SQL 语句。 - 目前 TiDB 一次只能 Cancel 一条 SQL 语句。如果 TiDB 完全 Cancel 掉一条 SQL 语句并回收资源后,内存使用仍然大于该变量所设限制,TiDB 会开始下一次 Cancel 操作。 diff --git a/ticdc/deploy-ticdc.md b/ticdc/deploy-ticdc.md index 9f362a35bcd9..b8a76e15317a 100644 --- a/ticdc/deploy-ticdc.md +++ b/ticdc/deploy-ticdc.md @@ -95,7 +95,7 @@ tiup cluster upgrade --transfer-timeout 600 > **注意:** > -> 命令中的 `` 需要替换为集群名字,`` 需要替换为目标版本号,例如 v6.6.0。 +> 命令中的 `` 需要替换为集群名字,`` 需要替换为目标版本号,例如 v7.0.0。 ### 升级的注意事项 diff --git a/ticdc/ticdc-avro-protocol.md b/ticdc/ticdc-avro-protocol.md index cff3a0a07158..6c2be610a664 100644 --- a/ticdc/ticdc-avro-protocol.md +++ b/ticdc/ticdc-avro-protocol.md @@ -262,7 +262,7 @@ DECIMAL(10, 4) ## DDL 事件与 Schema 变更 -Avro 并不会向下游生成 DDL 事件。Avro 会在每次 DML 事件发生时检测是否发生 schema 变更,如果发生了 schema 变更,Avro 会生成新的 schema,并尝试向 Schema Registry 注册。注册时,Schema Registry 会做兼容性检测,如果此次 schema 变更没有通过兼容性检测,注册将会失败,Avro 并不会尝试解决 schema 的兼容性问题。 +Avro 并不会向下游生成 DDL 事件。Avro 会在每次 DML 事件发生时检测是否发生 schema 变更,如果发生了 schema 变更,Avro 会生成新的 schema,并尝试向 Schema Registry 注册。注册时,Schema Registry 会做兼容性检测,如果此次 schema 变更没有通过兼容性检测,注册将会失败,TiCDC 并不会尝试解决 schema 的兼容性问题。 同时,即使 schema 变更通过兼容性检测并成功注册新版本,数据的生产者和消费者可能仍然需要升级才能正确工作。 @@ -273,3 +273,7 @@ Avro 并不会向下游生成 DDL 事件。Avro 会在每次 DML 事件发生时 ## Topic 分发 Schema Registry 支持三种 [Subject Name Strategy](https://docs.confluent.io/platform/current/schema-registry/serdes-develop/index.html#subject-name-strategy):TopicNameStrategy、RecordNameStrategy 和 TopicRecordNameStrategy。目前 TiCDC Avro 只支持 TopicNameStrategy 一种,这意味着一个 kafka topic 只能接收一种数据格式的数据,所以 TiCDC Avro 禁止将多张表映射到同一个 topic。在创建 changefeed 时,如果配置的分发规则中,topic 规则不包含 `{schema}` 和 `{table}` 占位符,将会报错。 + +## 兼容性说明 + +* 在升级 TiCDC 集群到 v7.0.0 时,如果使用 Avro 同步的表包含 `FLOAT` 类型数据,请在升级前手动调整 Confluent Schema Registry 的兼容性策略为 `None`,使 changefeed 能够成功更新 schema。否则,在升级之后 changefeed 将无法更新 schema 并进入错误状态。详情请参考 GitHub issue [#8490](https://github.com/pingcap/tiflow/issues/8490)。 diff --git a/tidb-binlog/get-started-with-tidb-binlog.md b/tidb-binlog/get-started-with-tidb-binlog.md index a91c88c59939..f6d77905c368 100644 --- a/tidb-binlog/get-started-with-tidb-binlog.md +++ b/tidb-binlog/get-started-with-tidb-binlog.md @@ -47,7 +47,7 @@ sudo yum install -y mariadb-server {{< copyable "shell-regular" >}} ```bash -curl -LO https://download.pingcap.org/tidb-community-server-v6.6.0-linux-amd64.tar.gz | tar xzf - && +curl -LO https://download.pingcap.org/tidb-community-server-v7.0.0-linux-amd64.tar.gz | tar xzf - && cd tidb-latest-linux-amd64 ``` diff --git a/tidb-lightning/tidb-lightning-configuration.md b/tidb-lightning/tidb-lightning-configuration.md index 4b8289d05610..e8eac1b2fd78 100644 --- a/tidb-lightning/tidb-lightning-configuration.md +++ b/tidb-lightning/tidb-lightning-configuration.md @@ -52,7 +52,7 @@ table-concurrency = 6 # 数据的并发数。默认与逻辑 CPU 的数量相同。 # 混合部署的情况下可以将其大小配置为逻辑 CPU 数的 75%,以限制 CPU 的使用。 -# region-concurrency = +# region-concurrency = # I/O 最大并发数。I/O 并发量太高时,会因硬盘内部缓存频繁被刷新 # 而增加 I/O 等待时间,导致缓存未命中和读取速度降低。 @@ -63,6 +63,7 @@ io-concurrency = 5 # 在忽略非严重错误所在的行数据之后,迁移任务可以继续执行。 # 将该值设置为 N,表示 TiDB Lightning 会在遇到第 (N+1) 个错误时停止迁移任务。 # 被忽略的行会被记录到位于目标集群的 "task info" 数据库中。最大错误数可以通过下面参数配置。 +# 默认值为 MaxInt64 字节,即 9223372036854775807 字节。 max-error = 0 # 参数 task-info-schema-name 指定用于存储 TiDB Lightning 执行结果的数据库。 # 要关闭该功能,需要将该值设置为空字符串。 @@ -113,8 +114,8 @@ driver = "file" # "local":Physical Import Mode,默认使用。适用于 TB 级以上大数据量,但导入期间下游 TiDB 无法对外提供服务。 # "tidb":Logical Import Mode。TB 级以下数据量可以采用,下游 TiDB 可正常提供服务。 # backend = "local" -# 是否允许向已存在数据的表导入数据。默认值为 false。 -# 当使用并行导入模式时,由于多个 TiDB Lightning 实例同时导入一张表,因此此开关必须设置为 true。 +# 是否允许启动多个 TiDB Lightning 实例(**physical import mode**)并行导入到一个或多个目标表。默认取值为 false。注意,这个参数**不是用于增量导入数据**,仅限目标表为空的场景使用。 +# 多个 TiDB Lightning 实例(physical import mode)同时导入一张表时,此开关必须设置为 true。但前提是目标表不能存在数据,即所有的数据都只能是由 TiDB Lightning 导入。 # incremental-import = false # 当后端是 “importer” 时,tikv-importer 的监听地址(需改为实际地址)。 addr = "172.16.31.10:8287" @@ -126,9 +127,9 @@ addr = "172.16.31.10:8287" # Physical Import Mode 设置是否检测和解决重复的记录(唯一键冲突)。 # 目前支持三种解决方法: -# - record: 仅将重复记录添加到目的 TiDB 中的 `lightning_task_info.conflict_error_v1` 表中。注意,该方法要求目的 TiKV 的版本为 v5.2.0 或更新版本。如果版本过低,则会启用下面的 'none' 模式。 -# - none: 不检测重复记录。该模式是三种模式中性能最佳的,但是可能会导致目的 TiDB 中出现数据不一致的情况。 -# - remove: 记录所有的重复记录,和 'record' 模式相似。但是会删除所有的重复记录,以确保目的 TiDB 中的数据状态保持一致。 +# - record: 数据写入目标表后,将目标表中重复记录添加到目标 TiDB 中的 `lightning_task_info.conflict_error_v1` 表中。注意,该方法要求目标 TiKV 的版本为 v5.2.0 或更新版本。如果版本过低,则会启用下面的 'none' 模式。 +# - none: 不检测重复记录。该模式是三种模式中性能最佳的,但是如果数据源存在重复记录,会导致 TiDB 中出现数据不一致的情况。 +# - remove: 记录所有目标表中的重复记录,和 'record' 模式相似。但是会删除目标表所有的重复记录,以确保目标 TiDB 中的数据状态保持一致。 # duplicate-resolution = 'none' # Physical Import Mode 一次请求中发送的 KV 数量。 # send-kv-pairs = 32768 @@ -260,9 +261,9 @@ log-level = "error" # 设置 TiDB 会话变量,提升 Checksum 和 Analyze 的速度。 # 各参数定义可参阅”控制 Analyze 并发度“文档 build-stats-concurrency = 20 -distsql-scan-concurrency = 100 +distsql-scan-concurrency = 15 index-serial-scan-concurrency = 20 -checksum-table-concurrency = 16 +checksum-table-concurrency = 2 # 解析和执行 SQL 语句的默认 SQL 模式。 sql-mode = "ONLY_FULL_GROUP_BY,NO_ENGINE_SUBSTITUTION" diff --git a/tidb-lightning/troubleshoot-tidb-lightning.md b/tidb-lightning/troubleshoot-tidb-lightning.md index e824e88036f9..b7c4a4d3f356 100644 --- a/tidb-lightning/troubleshoot-tidb-lightning.md +++ b/tidb-lightning/troubleshoot-tidb-lightning.md @@ -49,7 +49,7 @@ strict-format = true 不推荐在命令行中直接使用 `nohup` 启动进程,推荐[使用脚本启动 `tidb-lightning`](/tidb-lightning/deploy-tidb-lightning.md)。 -另外,如果从 TiDB Lightning 的 log 的最后一条日志显示遇到的错误是 "Context canceled",需要在日志中搜索第一条 "ERROR" 级别的日志。在这条日志之前,通常也会紧跟有一条 "got signal to exit",表示 Lighting 是收到中断信号然后退出的。 +另外,如果从 TiDB Lightning 的 log 的最后一条日志显示遇到的错误是 "Context canceled",需要在日志中搜索第一条 "ERROR" 级别的日志。在这条日志之前,通常也会紧跟有一条 "got signal to exit",表示 Lightning 是收到中断信号然后退出的。 ## 使用 TiDB Lightning 后,TiDB 集群变慢,CPU 占用高 diff --git a/tidb-resource-control.md b/tidb-resource-control.md index 3f82d4df5108..d4fb17de587b 100644 --- a/tidb-resource-control.md +++ b/tidb-resource-control.md @@ -5,6 +5,10 @@ summary: 介绍如何通过资源管控能力来实现对应用资源消耗的 # 使用资源管控 (Resource Control) 实现资源隔离 +> **警告:** +> +> 资源管控是 TiDB 在 v7.0.0 是实验特性,其语法或者行为表现在 GA 前可能会发生变化。 + 使用资源管控特性,集群管理员可以定义资源组 (Resource Group),通过资源组限定读写的配额。 TiDB 资源管控特性提供了两层资源管理能力,包括在 TiDB 层的流控能力和 TiKV 层的优先级调度的能力。两个能力可以单独或者同时开启,详情请参见[参数组合效果表](#相关参数)。将用户绑定到某个资源组后,TiDB 层会根据用户所绑定资源组设定的读写配额对用户的读写请求做流控,TiKV 层会根据读写配额映射的优先级来对请求做调度。通过流控和调度这两层控制,可以实现应用的资源隔离,满足服务质量 (QoS) 要求。 @@ -165,7 +169,7 @@ TiKV 中也记录了来自于不同资源组的请求 QPS,详见 [TiKV监控 ## 工具兼容性 -资源管控目前不影响数据导入导出以及其他同步工具的正常使用,BR、TiDB Lightning、TiCDC 等工具不支持对资源管控相关 DDL 的处理,这些工具的资源消耗也不受资源管控的限制。 +资源管控目前为实验特性,不影响数据导入导出以及其他同步工具的正常使用,BR、TiDB Lightning、TiCDC 等工具不支持对资源管控相关 DDL 的处理,这些工具的资源消耗也不受资源管控的限制。 ## 另请参阅 diff --git a/time-to-live.md b/time-to-live.md index 2182cf73d291..20d2b5fefe5c 100644 --- a/time-to-live.md +++ b/time-to-live.md @@ -94,7 +94,7 @@ TTL 可以和[数据类型的默认值](/data-type-default-values.md)一起使 ```sql CREATE TABLE t1 ( id int PRIMARY KEY, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) TTL = `created_at` + INTERVAL 3 MONTH; ``` diff --git a/tiup/tiup-cluster.md b/tiup/tiup-cluster.md index c436d3e898dc..be80fe5eedee 100644 --- a/tiup/tiup-cluster.md +++ b/tiup/tiup-cluster.md @@ -118,12 +118,12 @@ tidb_servers: ... ``` -假如我们想要使用 TiDB 的 v6.6.0 版本,集群名字为 `prod-cluster`,则执行以下命令: +假如我们想要使用 TiDB 的 v7.0.0 版本,集群名字为 `prod-cluster`,则执行以下命令: {{< copyable "shell-regular" >}} ```shell -tiup cluster deploy -p prod-cluster v6.6.0 /tmp/topology.yaml +tiup cluster deploy -p prod-cluster v7.0.0 /tmp/topology.yaml ``` 执行过程中会再次确认拓扑结构并提示输入目标机器上的 root 密码(-p 表示使用密码): @@ -131,7 +131,7 @@ tiup cluster deploy -p prod-cluster v6.6.0 /tmp/topology.yaml ```bash Please confirm your topology: TiDB Cluster: prod-cluster -TiDB Version: v6.6.0 +TiDB Version: v7.0.0 Type Host Ports OS/Arch Directories ---- ---- ----- ------- ----------- pd 172.16.5.134 2379/2380 linux/x86_64 deploy/pd-2379,data/pd-2379 @@ -174,7 +174,7 @@ tiup cluster list Starting /root/.tiup/components/cluster/v1.11.3/cluster list Name User Version Path PrivateKey ---- ---- ------- ---- ---------- -prod-cluster tidb v6.6.0 /root/.tiup/storage/cluster/clusters/prod-cluster /root/.tiup/storage/cluster/clusters/prod-cluster/ssh/id_rsa +prod-cluster tidb v7.0.0 /root/.tiup/storage/cluster/clusters/prod-cluster /root/.tiup/storage/cluster/clusters/prod-cluster/ssh/id_rsa ``` ## 启动集群 @@ -202,7 +202,7 @@ tiup cluster display prod-cluster ``` Starting /root/.tiup/components/cluster/v1.11.3/cluster display prod-cluster TiDB Cluster: prod-cluster -TiDB Version: v6.6.0 +TiDB Version: v7.0.0 ID Role Host Ports OS/Arch Status Data Dir Deploy Dir -- ---- ---- ----- ------- ------ -------- ---------- 172.16.5.134:3000 grafana 172.16.5.134 3000 linux/x86_64 Up - deploy/grafana-3000 @@ -270,7 +270,7 @@ tiup cluster display prod-cluster ``` Starting /root/.tiup/components/cluster/v1.11.3/cluster display prod-cluster TiDB Cluster: prod-cluster -TiDB Version: v6.6.0 +TiDB Version: v7.0.0 ID Role Host Ports OS/Arch Status Data Dir Deploy Dir -- ---- ---- ----- ------- ------ -------- ---------- 172.16.5.134:3000 grafana 172.16.5.134 3000 linux/x86_64 Up - deploy/grafana-3000 @@ -370,12 +370,12 @@ Global Flags: -y, --yes 跳过所有的确认步骤 ``` -例如,把集群升级到 v6.6.0 的命令为: +例如,把集群升级到 v7.0.0 的命令为: {{< copyable "shell-regular" >}} ```bash -tiup cluster upgrade tidb-test v6.6.0 +tiup cluster upgrade tidb-test v7.0.0 ``` ## 更新配置 @@ -555,11 +555,11 @@ tiup cluster audit Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.11.3/cluster audit ID Time Command -- ---- ------- -4BLhr0 2022-02-09T23:55:09+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster deploy test v6.6.0 /tmp/topology.yaml -4BKWjF 2022-02-09T23:36:57+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster deploy test v6.6.0 /tmp/topology.yaml -4BKVwH 2022-02-09T23:02:08+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster deploy test v6.6.0 /tmp/topology.yaml -4BKKH1 2022-02-09T16:39:04+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster destroy test -4BKKDx 2022-02-09T16:36:57+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster deploy test v6.6.0 /tmp/topology.yaml +4BLhr0 2022-03-29T23:55:09+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster deploy test v7.0.0 /tmp/topology.yaml +4BKWjF 2022-03-029T23:36:57+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster deploy test v7.0.0 /tmp/topology.yaml +4BKVwH 2022-03-29T23:02:08+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster deploy test v7.0.0 /tmp/topology.yaml +4BKKH1 2022-03-29T16:39:04+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster destroy test +4BKKDx 2022-03-29T16:36:57+08:00 /home/tidb/.tiup/components/cluster/v1.11.3/cluster deploy test v7.0.0 /tmp/topology.yaml ``` 第一列为 audit-id,如果想看某个命令的执行日志,则传入这个 audit-id: diff --git a/tiup/tiup-component-cluster-deploy.md b/tiup/tiup-component-cluster-deploy.md index e0031853d119..ccca9aba1d29 100644 --- a/tiup/tiup-component-cluster-deploy.md +++ b/tiup/tiup-component-cluster-deploy.md @@ -13,7 +13,7 @@ tiup cluster deploy [flags] ``` - `` 表示新集群的名字,不能和现有集群同名 -- `` 为要部署的 TiDB 集群版本号,如 `v6.6.0` +- `` 为要部署的 TiDB 集群版本号,如 `v7.0.0` - `` 为事先编写好的[拓扑文件](/tiup/tiup-cluster-topology-reference.md) ## 选项 diff --git a/tiup/tiup-component-management.md b/tiup/tiup-component-management.md index 3857e97373e9..bd31b167f84b 100644 --- a/tiup/tiup-component-management.md +++ b/tiup/tiup-component-management.md @@ -69,12 +69,12 @@ tiup install tidb tiup install tidb:nightly ``` -示例三:使用 TiUP 安装 v6.6.0 版本的 TiKV +示例三:使用 TiUP 安装 v7.0.0 版本的 TiKV {{< copyable "shell-regular" >}} ```shell -tiup install tikv:v6.6.0 +tiup install tikv:v7.0.0 ``` ## 升级组件 @@ -127,12 +127,12 @@ Flags: 如果想要多次启动同一个组件并复用之前的工作目录,就可以在启动时用 `--tag` 指定相同的名字。指定 tag 后,在实例终止时就*不会自动删除*工作目录,方便下次启动时复用。 -示例一:运行 v6.6.0 版本的 TiDB +示例一:运行 v7.0.0 版本的 TiDB {{< copyable "shell-regular" >}} ```shell -tiup tidb:v6.6.0 +tiup tidb:v7.0.0 ``` 示例二:指定 tag 运行 TiKV @@ -218,12 +218,12 @@ component 为要卸载的组件名称,version 为要卸载的版本,这两 - 若省略版本,加 `--all` 表示卸载该组件所有版本 - 若版本和组件都省略,则加 `--all` 表示卸载所有组件及其所有版本 -示例一:卸载 v6.6.0 版本的 TiDB +示例一:卸载 v7.0.0 版本的 TiDB {{< copyable "shell-regular" >}} ```shell -tiup uninstall tidb:v6.6.0 +tiup uninstall tidb:v7.0.0 ``` 示例二:卸载所有版本的 TiKV diff --git a/tiup/tiup-mirror.md b/tiup/tiup-mirror.md index 26d2955288c5..01a549b4140a 100644 --- a/tiup/tiup-mirror.md +++ b/tiup/tiup-mirror.md @@ -86,9 +86,9 @@ tiup mirror clone [global-version] [flags] 如果只想克隆某个组件的某一个版本而不是所有版本,则使用 `--=` 来限定,例如: - - 只想克隆 TiDB 的 v6.6.0 版本,则执行 `tiup mirror clone --tidb v6.6.0` - - 只想克隆 TiDB 的 v6.6.0 版本,以及 TiKV 的所有版本,则执行 `tiup mirror clone --tidb v6.6.0 --tikv all` - - 克隆一个集群的所有组件的 v6.6.0 版本,则执行 `tiup mirror clone v6.6.0` + - 只想克隆 TiDB 的 v7.0.0 版本,则执行 `tiup mirror clone --tidb v7.0.0` + - 只想克隆 TiDB 的 v7.0.0 版本,以及 TiKV 的所有版本,则执行 `tiup mirror clone --tidb v7.0.0 --tikv all` + - 克隆一个集群的所有组件的 v7.0.0 版本,则执行 `tiup mirror clone v7.0.0` 克隆完成后,签名密钥会自动设置。 diff --git a/tiup/tiup-playground.md b/tiup/tiup-playground.md index 080b437746d4..566e50569ae6 100644 --- a/tiup/tiup-playground.md +++ b/tiup/tiup-playground.md @@ -19,7 +19,7 @@ tiup playground ${version} [flags] - 因为该命令没有指定 playground 的版本,TiUP 会先查找已安装的 playground 的最新版本,假设已安装的 playground 最新版为 v1.11.3,则该命令相当于 tiup playground:v1.11.3 - 如果 playground 从未安装过任何版本的 TiDB/TiKV/PD 组件,TiUP 会先安装这些组件的最新稳定版,然后再启动运行这些组件的实例 -- 因为该命令没有指定 TiDB/PD/TiKV 各组件的版本,默认情况下,它会使用各组件的最新发布版本,假设当前为 v6.6.0,则该命令相当于 tiup playground:1.11.3 v6.6.0 +- 因为该命令没有指定 TiDB/PD/TiKV 各组件的版本,默认情况下,它会使用各组件的最新发布版本,假设当前为 v7.0.0,则该命令相当于 tiup playground:1.11.3 v7.0.0 - 因为该命令也没有指定各组件的个数,默认情况下,它会启动由 1 个 TiDB、1 个 TiKV、1 个 PD 和 1 个 TiFlash 实例构成的最小化集群 - 在依次启动完各个 TiDB 组件后,playground 会提醒集群启动成功,并告诉你一些有用的信息,譬如如何通过 MySQL 客户端连接集群、如何访问 [TiDB Dashboard](/dashboard/dashboard-intro.md) 等 diff --git a/upgrade-tidb-using-tiup.md b/upgrade-tidb-using-tiup.md index b043bc89e58c..e1914137556f 100644 --- a/upgrade-tidb-using-tiup.md +++ b/upgrade-tidb-using-tiup.md @@ -7,14 +7,15 @@ aliases: ['/docs-cn/dev/upgrade-tidb-using-tiup/','/docs-cn/dev/how-to/upgrade/u 本文档适用于以下升级路径: -- 使用 TiUP 从 TiDB 4.0 版本升级至 TiDB 6.6。 -- 使用 TiUP 从 TiDB 5.0-5.4 版本升级至 TiDB 6.6。 -- 使用 TiUP 从 TiDB 6.0 版本升级至 TiDB 6.6。 -- 使用 TiUP 从 TiDB 6.1 版本升级至 TiDB 6.6。 -- 使用 TiUP 从 TiDB 6.2 版本升级至 TiDB 6.6。 -- 使用 TiUP 从 TiDB 6.3 版本升级至 TiDB 6.6。 -- 使用 TiUP 从 TiDB 6.4 版本升级至 TiDB 6.6。 -- 使用 TiUP 从 TiDB 6.5 版本升级至 TiDB 6.6。 +- 使用 TiUP 从 TiDB 4.0 版本升级至 TiDB 7.0。 +- 使用 TiUP 从 TiDB 5.0-5.4 版本升级至 TiDB 7.0。 +- 使用 TiUP 从 TiDB 6.0 版本升级至 TiDB 7.0。 +- 使用 TiUP 从 TiDB 6.1 版本升级至 TiDB 7.0。 +- 使用 TiUP 从 TiDB 6.2 版本升级至 TiDB 7.0。 +- 使用 TiUP 从 TiDB 6.3 版本升级至 TiDB 7.0。 +- 使用 TiUP 从 TiDB 6.4 版本升级至 TiDB 7.0。 +- 使用 TiUP 从 TiDB 6.5 版本升级至 TiDB 7.0。 +- 使用 TiUP 从 TiDB 6.6 版本升级至 TiDB 7.0。 > **警告:** > @@ -24,17 +25,17 @@ aliases: ['/docs-cn/dev/upgrade-tidb-using-tiup/','/docs-cn/dev/how-to/upgrade/u > **注意:** > -> 如果原集群是 3.0 或 3.1 或更早的版本,不支持直接升级到 6.6.0 及后续修订版本。你需要先从早期版本升级到 4.0 后,再从 4.0 升级到 6.6.0 及后续修订版本。 +> 如果原集群是 3.0 或 3.1 或更早的版本,不支持直接升级到 7.0.0 及后续修订版本。你需要先从早期版本升级到 4.0 后,再从 4.0 升级到 7.0.0 及后续修订版本。 ## 1. 升级兼容性说明 - TiDB 目前暂不支持版本降级或升级后回退。 -- 使用 TiDB Ansible 管理的 4.0 版本集群,需要先按照 [4.0 版本文档的说明](https://docs.pingcap.com/zh/tidb/v4.0/upgrade-tidb-using-tiup)将集群导入到 TiUP (`tiup cluster`) 管理后,再按本文档说明升级到 6.6.0 版本。 -- 若要将 3.0 之前的版本升级至 6.6.0 版本: +- 使用 TiDB Ansible 管理的 4.0 版本集群,需要先按照 [4.0 版本文档的说明](https://docs.pingcap.com/zh/tidb/v4.0/upgrade-tidb-using-tiup)将集群导入到 TiUP (`tiup cluster`) 管理后,再按本文档说明升级到 7.0.0 版本。 +- 若要将 3.0 之前的版本升级至 7.0.0 版本: 1. 首先[通过 TiDB Ansible 升级到 3.0 版本](https://docs.pingcap.com/zh/tidb/v3.0/upgrade-tidb-using-ansible)。 2. 然后按照 [4.0 版本文档的说明](https://docs.pingcap.com/zh/tidb/v4.0/upgrade-tidb-using-tiup),使用 TiUP (`tiup cluster`) 将 TiDB Ansible 配置导入。 3. 将集群升级至 4.0 版本。 - 4. 按本文档说明将集群升级到 6.6.0 版本。 + 4. 按本文档说明将集群升级到 7.0.0 版本。 - 支持 TiDB Binlog,TiCDC,TiFlash 等组件版本的升级。 - 将 v6.3.0 之前的 TiFlash 升级至 v6.3.0 及之后的版本时,需要特别注意:在 Linux AMD64 架构的硬件平台部署 TiFlash 时,CPU 必须支持 AVX2 指令集。而在 Linux ARM64 架构的硬件平台部署 TiFlash 时,CPU 必须支持 ARMv8 架构。具体请参考 [6.3.0 版本 Release Notes](/releases/release-6.3.0.md#其他) 中的描述。 - 具体不同版本的兼容性说明,请查看各个版本的 [Release Note](/releases/release-notes.md)。请根据各个版本的 Release Note 的兼容性更改调整集群的配置。 @@ -46,7 +47,7 @@ aliases: ['/docs-cn/dev/upgrade-tidb-using-tiup/','/docs-cn/dev/how-to/upgrade/u ### 2.1 查阅兼容性变更 -查阅 TiDB v6.6.0 release notes 中的[兼容性变更](/releases/release-6.6.0.md#兼容性变更)。如果有任何变更影响到了你的升级,请采取相应的措施。 +查阅 TiDB v7.0.0 release notes 中的[兼容性变更](/releases/release-7.0.0.md#兼容性变更)。如果有任何变更影响到了你的升级,请采取相应的措施。 ### 2.2 升级 TiUP 或更新 TiUP 离线镜像 @@ -123,7 +124,7 @@ tiup update cluster > 以下情况可跳过此步骤: > > - 原集群没有修改过配置参数,或通过 tiup cluster 修改过参数但不需要调整。 -> - 升级后对未修改过的配置项希望使用 `6.6.0` 默认参数。 +> - 升级后对未修改过的配置项希望使用 `7.0.0` 默认参数。 1. 进入拓扑文件的 `vi` 编辑模式: @@ -139,7 +140,7 @@ tiup update cluster > **注意:** > -> 升级到 6.6.0 版本前,请确认已在 4.0 修改的参数在 6.6.0 版本中是兼容的,可参考 [TiKV 配置文件描述](/tikv-configuration-file.md)。 +> 升级到 7.0.0 版本前,请确认已在 4.0 修改的参数在 7.0.0 版本中是兼容的,可参考 [TiKV 配置文件描述](/tikv-configuration-file.md)。 ### 2.4 检查当前集群的健康状况 @@ -176,12 +177,12 @@ tiup cluster check --cluster tiup cluster upgrade ``` -以升级到 6.6.0 版本为例: +以升级到 7.0.0 版本为例: {{< copyable "shell-regular" >}} ``` -tiup cluster upgrade v6.6.0 +tiup cluster upgrade v7.0.0 ``` > **注意:** @@ -234,7 +235,7 @@ tiup cluster display ``` Cluster type: tidb Cluster name: -Cluster version: v6.6.0 +Cluster version: v7.0.0 ``` ## 4. 升级 FAQ @@ -280,5 +281,5 @@ tiup cluster upgrade --force {{< copyable "" >}} ``` -tiup install ctl:v6.6.0 +tiup install ctl:v7.0.0 ```