-
Notifications
You must be signed in to change notification settings - Fork 2
/
blog.html
38 lines (38 loc) · 193 KB
/
blog.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!doctype html>
<html lang="en-GB" dir="ltr" class="blog-wrapper blog-list-page plugin-blog plugin-id-default">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.1.0">
<title data-rh="true">Blog | HwameiStor</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://hwameistor.io/blog"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" property="og:title" content="Blog | HwameiStor"><meta data-rh="true" name="description" content="Blog"><meta data-rh="true" property="og:description" content="Blog"><meta data-rh="true" name="docusaurus_tag" content="blog_posts_list"><meta data-rh="true" name="docsearch:docusaurus_tag" content="blog_posts_list"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://hwameistor.io/blog"><link data-rh="true" rel="alternate" href="https://hwameistor.io/blog" hreflang="en-GB"><link data-rh="true" rel="alternate" href="https://hwameistor.io/cn/blog" hreflang="zh-CN"><link data-rh="true" rel="alternate" href="https://hwameistor.io/blog" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="HwameiStor RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="HwameiStor Atom Feed"><link rel="stylesheet" href="/assets/css/styles.b1b5b1e9.css">
<link rel="preload" href="/assets/js/runtime~main.22d15fd4.js" as="script">
<link rel="preload" href="/assets/js/main.fcf31eec.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div role="region" aria-label="theme.common.skipToMainContent"><a href="#" class="skipToContent_fXgn">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo.svg" alt="My Site Logo" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/logo_dark.svg" alt="My Site Logo" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">HwameiStor</b></a><a class="navbar__item navbar__link" href="/docs/intro">Documentation</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" class="iconLanguage_nlXk"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg>English</a><ul class="dropdown__menu"><li><a href="/blog" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active" lang="en-GB">English</a></li><li><a href="/cn/blog" target="_self" rel="noopener noreferrer" class="dropdown__link" lang="zh-CN">中文</a></li></ul></div><a href="https://github.com/hwameistor/hwameistor" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_ZlJk"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Loading..." aria-label="Search" class="navbar__search-input search-bar" disabled=""></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper mainWrapper_z2l0"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_re4s thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_pO2u margin-bottom--md">Recent posts</div><ul class="sidebarItemList_Yudw clean-list"><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/blog/minio">HwameiStor Supports MinIO</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/blog/live">Livestream Highlights: Cloud Native Storage</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/blog/test">HwameiStor Capability, Security, Operation, and Maintenance Test</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/blog/3">LV and LVReplica</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/blog/2">Reliable Helper System for HwameiStor Is Online</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="title_f1Hy" itemprop="headline"><a itemprop="url" href="/blog/minio">HwameiStor Supports MinIO</a></h2><div class="container_mt6G margin-vert--md"><time datetime="2022-07-16T00:00:00.000Z" itemprop="datePublished">July 16, 2022</time> · <!-- -->5 min read</div><div class="margin-top--md margin-bottom--sm row"><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/zhaosimon" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://avatars.githubusercontent.com/u/36882380?v=4" alt="zhaosimon"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/zhaosimon" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">zhaosimon</span></a></div><small class="avatar__subtitle" itemprop="description">Developer</small></div></div></div><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/Michelle951" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://avatars.githubusercontent.com/u/35519562?v=4" alt="Michelle Wu"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/Michelle951" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Michelle Wu</span></a></div><small class="avatar__subtitle" itemprop="description">Technical Writer</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>This blog introduces an MinIO storage solution built on HwameiStor, and clarifies the detailed test procedures about whether HwameiStor can properly support those basic features and tenant isolation function provided by MinIO.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="minio-introduction">MinIO introduction<a class="hash-link" href="#minio-introduction" title="Direct link to heading"></a></h2><p>MinIO is a high performance object storage solution with native support for Kubernetes deployments.
It can provide distributed, S3-compatible, and multi-cloud storage service in public cloud, private cloud,
and edge computing scenarios. MinIO is a software-defined product and released under <a href="https://www.gnu.org/licenses/agpl-3.0.en.html" target="_blank" rel="noopener noreferrer">GNU Affero General Public License v3.0</a>.
It can also run well on x86 and other standard hardware.</p><p><img loading="lazy" alt="MinIO design" src="/assets/images/minio-design-50c5ded4364db203250dc5f007b8f613.png" width="245" height="219" class="img_ev3q"></p><p>MinIO is designed to meet private cloud's requirements for high performance,
in addition to all required features of object storage.
MinIO features easy to use, cost-effective, and high performance in providing scalable cloud-native object storage services.</p><p>MinIO works well in traditional object storage scenarios, such as secondary storage, disaster recovery, and archiving.
It also shows competitive capabilities in machine learning, big data, private cloud, hybrid cloud,
and other emerging fields to well support data analysis, high performance workloads, and cloud-native applications.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="minio-architecture">MinIO architecture<a class="hash-link" href="#minio-architecture" title="Direct link to heading"></a></h3><p>MinIO is designed for the cloud-native architecture, so it can be run as a lightweight container
and managed by external orchestration tools like Kubernetes.</p><p>The MinIO package comprises of static binary files less than 100 MB.
This small package enables it to efficiently use CPU and memory resources even
with high workloads and can host a large number of tenants on shared hardware.</p><p>MinIO's architecture is as follows:</p><p><img loading="lazy" alt="Architecture" src="/assets/images/architect-ce129da6d73d13ffdbb0e813bb33fe58.png" width="1092" height="684" class="img_ev3q"></p><p>MinIO can run on a standard server that have installed proper local drivers (JBOD/JBOF).
An MinIO cluster has a totally symmetric architecture. In other words,
each server provide same functions, without any name node or metadata server.</p><p>MinIO can write both data and metadata as objects, so there is no need to use metadata servers.
MinIO provides erasure coding, bitrot protection, encryption and other features in a strict and consistent way.</p><p>Each MinIO cluster is a set of distributed MinIO servers, one MinIO process running on each node.</p><p>MinIO runs in a userspace as a single process, and it uses lightweight co-routines for high concurrence.
It divides drivers into erasure sets (generally 16 drivers in each set),
and uses the deterministic hash algorithm to place objects into these erasure sets.</p><p>MinIO is specifically designed for large-scale and multi-datacenter cloud storage service.
Tenants can run their own MinIO clusters separately from others, getting rid of interruptions
from upgrade or security problems. Tenants can scale up by connecting multi clusters across geographical regions.</p><p><img loading="lazy" alt="node-distribution-setup" src="/assets/images/node-setup-83bd490fd5bac9fadf3650ed4d61314e.png" width="1271" height="1057" class="img_ev3q"></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="build-test-environment">Build test environment<a class="hash-link" href="#build-test-environment" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="deploy-kubernetes-cluster">Deploy Kubernetes cluster<a class="hash-link" href="#deploy-kubernetes-cluster" title="Direct link to heading"></a></h3><p>A Kubernetes cluster was deployed with three virtual machines: one as the master node and two as worker nodes. The kubelet version is 1.22.0.</p><p><img loading="lazy" alt="k8s-cluster" src="/assets/images/k8s-cluster-2e9998ffef1d3a00bad3b7e3a164e4ff.png" width="553" height="117" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="deploy-hwameistor-local-storage">Deploy HwameiStor local storage<a class="hash-link" href="#deploy-hwameistor-local-storage" title="Direct link to heading"></a></h3><p>Deploy HwameiStor local storage on Kubernetes:</p><p><img loading="lazy" alt="check HwameiStor local storage" src="/assets/images/kubectl-get-hwamei-pod-0cd9b8d67e92c776b7bcd8b348f70496.png" width="553" height="87" class="img_ev3q"></p><p>Allocate five disks (SDB, SDC, SDD, SDE, and SDF) for each worker node to support HwameiStor local disk management:</p><p><img loading="lazy" alt="lsblk" src="/assets/images/lsblk01-1b81d8560261b1885437ed9fb82481cc.png" width="553" height="192" class="img_ev3q"></p><p><img loading="lazy" alt="lsblk" src="/assets/images/lsblk02-9d75cd284b90f360762e7b6b4003f1fe.png" width="553" height="147" class="img_ev3q"></p><p>Check node status of local storage:</p><p><img loading="lazy" alt="get-lsn" src="/assets/images/kubectl-get-lsn-9655d5b584e42874a92047354ff54c15.png" width="553" height="67" class="img_ev3q"></p><p>Create storageClass:</p><p><img loading="lazy" alt="get-sc" src="/assets/images/kubectl-get-sc-860a03c344d7d8b2e26157ca5f6730a9.png" width="553" height="48" class="img_ev3q"></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="deploy-distributed-multi-tenant-cluster-minio-operator">Deploy distributed multi-tenant cluster (minio-operator)<a class="hash-link" href="#deploy-distributed-multi-tenant-cluster-minio-operator" title="Direct link to heading"></a></h2><p>This section will show how to deploy minio-operator, how to create a tenant,
and how to configure HwameiStor local volumes.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="deploy-minio-operator">Deploy minio-operator<a class="hash-link" href="#deploy-minio-operator" title="Direct link to heading"></a></h3><ol><li><p>Copy minio-operator repo to your local environment</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">git clone <https://github.com/minio/operator.git></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="helm-repo-list" src="/assets/images/helm-repo-list-f96e598528d3d564bcbb129221360620.png" width="538" height="50" class="img_ev3q"></p><p><img loading="lazy" alt="ls-operator" src="/assets/images/ls-opeartor-2d0c847e0ae10e022f408516d0b15c46.png" width="554" height="47" class="img_ev3q"></p></li><li><p>Enter helm operator directory <code>/root/operator/helm/operator</code></p><p><img loading="lazy" alt="ls-pwd" src="/assets/images/ls-pwd-177620b3543a6e3211f2ada8d9af1893.png" width="448" height="119" class="img_ev3q"></p></li><li><p>Deploy the minio-operator instance</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">helm install minio-operator \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">--namespace minio-operator \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">--create-namespace \</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">--generate-name .</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">--set persistence.storageClass=local-storage-hdd-lvm .</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></li><li><p>Check minio-operator running status</p><p><img loading="lazy" alt="get-all" src="/assets/images/kubectl-get-all-026455ec24122121ef5763df0c6f1d71.png" width="553" height="252" class="img_ev3q"></p></li></ol><h3 class="anchor anchorWithStickyNavbar_LWe7" id="create-tenants">Create tenants<a class="hash-link" href="#create-tenants" title="Direct link to heading"></a></h3><ol><li><p>Enter the <code>/root/operator/examples/kustomization/base</code> directory and change <code>tenant.yaml</code></p><p><img loading="lazy" alt="git-diff-yaml" src="/assets/images/git-diff-tenant-yaml-7ae47ae03222e56b47635aea676dc294.png" width="553" height="489" class="img_ev3q"></p></li><li><p>Enter the <code>/root/operator/helm/tenant/</code> directory and change <code>values.yaml</code></p><p><img loading="lazy" alt="git-diff-values.yaml" src="/assets/images/git-diff-values-yaml-4a948a45aba4b18a76b4938e24b0dfe7.png" width="553" height="576" class="img_ev3q"></p></li><li><p>Enter <code>/root/operator/examples/kustomization/tenant-lite</code> directory and change <code>kustomization.yaml</code></p><p><img loading="lazy" alt="git-diff-kustomization-yaml" src="/assets/images/git-diff-kustomization-yaml-0ad007bd15ea443b07d8366fb2eb65bd.png" width="553" height="249" class="img_ev3q"></p></li><li><p>Change <code>tenant.yaml</code></p><p><img loading="lazy" alt="git-diff-tenant-yaml02" src="/assets/images/git-diff-tenant-yaml02-24937bd8e84cfb6f82a3d4c61f3cb5ff.png" width="553" height="266" class="img_ev3q"></p></li><li><p>Change <code>tenantNamePatch.yaml</code></p><p><img loading="lazy" alt="git-diff-tenant-name-patch-yaml" src="/assets/images/git-diff-tenant-name-patch-yaml-4b8be598ff292c9492f86640650d8a0c.png" width="553" height="125" class="img_ev3q"></p></li><li><p>Create a tenant</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl apply –k . </span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></li><li><p>Check resource status of the tenant minio-t1</p><p><img loading="lazy" alt="kubectl-get-all-nminio-tenant" src="/assets/images/kubectl-get-all-nminio-tenant-497b2e2eab8bb4d29b3de1c0b1a6dd7b.png" width="553" height="322" class="img_ev3q"></p></li><li><p>To create another new tenant, you can first create a new directory <code>tenant</code> (in this example <code>tenant-lite-2</code>) under <code>/root/operator/examples/kustomization</code> and change the files listed above</p><p><img loading="lazy" alt="pwd-ls-ls" src="/assets/images/pwd-ls-ls-3c18ba9e4e0eabed279cac4788adc00e.png" width="1078" height="209" class="img_ev3q"></p></li><li><p>Run <code>kubectl apply –k .</code> to create the new tenant <code>minio-t2</code></p><p><img loading="lazy" alt="kubectl-get-all-nminio" src="/assets/images/kubectl-get-all-minio-8c0df6d0f7c86bf1ac6260795a55ab3c.png" width="1022" height="659" class="img_ev3q"></p></li></ol><h3 class="anchor anchorWithStickyNavbar_LWe7" id="configure-hwameistor-local-volumes">Configure HwameiStor local volumes<a class="hash-link" href="#configure-hwameistor-local-volumes" title="Direct link to heading"></a></h3><p>Run the following commands in sequence to finish this configuration:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl get statefulset.apps/minio-t1-pool-0 -nminio-tenant -oyaml</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="local-storage-hdd-lvm" src="/assets/images/local-storage-hdd-lvm-214813a44eb9b94a4a7c12b592bdca77.png" width="437" height="382" class="img_ev3q"></p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl get pvc –A</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="kubectl-get-pvc" src="/assets/images/kubectl-get-pvc-b00f37660c7a43e7a79d9fdb12116a6b.png" width="553" height="105" class="img_ev3q"></p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl get pvc export-minio6-0 -nminio-6 -oyaml</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="kubectl-get-pvc-export-oyaml" src="/assets/images/kubectl-get-pvc-export-oyaml-bd9d6c3aea26b5e4217bb163f26b68f9.png" width="553" height="371" class="img_ev3q"></p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl get pv</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="kubectl-get-pv" src="/assets/images/kubectl-get-pv-d6a7f8f8d6abe20eb23588513908066d.png" width="553" height="85" class="img_ev3q"></p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl get pvc data0-minio-t1-pool-0-0 -nminio-tenant -oyaml</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="kubectl-get-pvc-oyaml" src="/assets/images/kubectl-get-pvc-oyaml-71f7f2ebc33ee977d2c399425bab30bd.png" width="553" height="448" class="img_ev3q"></p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl get lv</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="kubectl-get-lv" src="/assets/images/kubectl-get-lv-b1a03ec396f97f755f15ad387225c38a.png" width="553" height="95" class="img_ev3q"></p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubect get lvr</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="kubectl-get-lvr" src="/assets/images/kubectl-get-lvr-aa5334390dd09d70b369178e2a40df54.png" width="553" height="86" class="img_ev3q"></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="test-hwameistors-support-for-minio">Test HwameiStor's support for MinIo<a class="hash-link" href="#test-hwameistors-support-for-minio" title="Direct link to heading"></a></h2><p>With the above settings in place, now let's test basic features and tenant isolation.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="test-basic-features">Test basic features<a class="hash-link" href="#test-basic-features" title="Direct link to heading"></a></h3><ol><li><p>Log in to <code>minio console:10.6.163.52:30401/login</code></p><p><img loading="lazy" alt="minio-opeartor-console-login" src="/assets/images/minio-opeartor-console-login-d2690ef3832515f90e4bb546c515cc0f.png" width="681" height="369" class="img_ev3q"></p></li><li><p>Get JWT by <code>kubectl minio proxy -n minio-operator</code></p><p><img loading="lazy" alt="minio-opeartor-console-login" src="/assets/images/kubectl-minio-proxy-jwt-9e10468de2cb3110cccb7949ba403e65.png" width="1144" height="328" class="img_ev3q"></p></li><li><p>Browse and manage information about newly-created tenants</p><p><img loading="lazy" alt="tenant01" src="/assets/images/tenant01-823ef226f559957037ea57ed833ef2c2.png" width="1265" height="562" class="img_ev3q"></p><p><img loading="lazy" alt="tenant02" src="/assets/images/tenant02-847ee3e98f7fb5cad5151f28d1624676.png" width="1265" height="715" class="img_ev3q"></p><p><img loading="lazy" alt="tenant03" src="/assets/images/tenant03-39a6e5a9ece83b93a6fc68bdf709db12.png" width="1265" height="583" class="img_ev3q"></p><p><img loading="lazy" alt="tenant04" src="/assets/images/tenant04-517db946c00cc899af5dc790a055f793.png" width="1265" height="748" class="img_ev3q"></p><p><img loading="lazy" alt="tenant05" src="/assets/images/tenant05-3a12444cc96c9cd2dbf73fa722b9b2c0.png" width="1271" height="733" class="img_ev3q"></p><p><img loading="lazy" alt="tenant06" src="/assets/images/tenant06-15e19517c953f7c9820da7c818837250.png" width="1271" height="855" class="img_ev3q"></p></li><li><p>Log in as tenant minio-t1 (Account: minio)</p><p><img loading="lazy" alt="login-minio" src="/assets/images/login-minio-t1-01-68939a43710d29e15a94152ff248f7a6.png" width="1265" height="760" class="img_ev3q"></p><p><img loading="lazy" alt="login-minio" src="/assets/images/login-minio-t1-02-b65ab20229aa0efd8e586c7467514ab6.png" width="1265" height="754" class="img_ev3q"></p></li><li><p>Browse bucket bk-1</p><p><img loading="lazy" alt="view-bucket-1" src="/assets/images/view-bucket-01-50f2dac3e66f455de29df8ea6679f7fc.png" width="1271" height="409" class="img_ev3q"></p><p><img loading="lazy" alt="view-bucket-1" src="/assets/images/view-bucket-02-fb93474795cf22f2edea0fde91a5ad19.png" width="1271" height="378" class="img_ev3q"></p><p><img loading="lazy" alt="view-bucket-1" src="/assets/images/view-bucket-03-313ac3d13919cc855ac4e5e17d9cf61f.png" width="1271" height="467" class="img_ev3q"></p></li><li><p>Create a new bucket bk-1-1</p><p><img loading="lazy" alt="create-bucket-1-1" src="/assets/images/create-bucket-1-1-6dd53d944ee882f572e7f1d4599ca021.png" width="1271" height="415" class="img_ev3q"></p><p><img loading="lazy" alt="create-bucket-1-1" src="/assets/images/create-bucket-1-2-16fe74cc6ae2eac86d13da593666f786.png" width="1271" height="669" class="img_ev3q"></p><p><img loading="lazy" alt="create-bucket-1-1" src="/assets/images/create-bucket-1-3-8388f7f0c3ae95ef6086aebd48e9bc8a.png" width="1271" height="354" class="img_ev3q"></p></li><li><p>Create path path-1-2</p><p><img loading="lazy" alt="create-path-1-2" src="/assets/images/create-path-1-2-01-a92a560272a856ed5844706f34e201a2.png" width="1265" height="644" class="img_ev3q"></p><p><img loading="lazy" alt="create-path-1-2" src="/assets/images/create-path-1-2-02-dbc0eb8def9147bbbab83a8ded628579.png" width="1271" height="336" class="img_ev3q"></p></li><li><p>Upload the file</p><p><img loading="lazy" alt="upload-file" src="/assets/images/upload-file-success-71d39754b906216229e242c7a9691b88.png" width="1271" height="375" class="img_ev3q"></p><p><img loading="lazy" alt="upload-file" src="/assets/images/upload-file-success-02-f26a3be0810b08e933b1a53e894840e7.png" width="1265" height="534" class="img_ev3q"></p><p><img loading="lazy" alt="upload-file" src="/assets/images/upload-file-success-03-94d9c32d8be5cb1fcf7e791f6e0564e6.png" width="1271" height="495" class="img_ev3q"></p></li><li><p>Upload the folder</p><p><img loading="lazy" alt="upload-folder" src="/assets/images/upload-folder-success-01-ce4cca3d1572ed78c4d1445ef8ec5092.png" width="1271" height="406" class="img_ev3q"></p><p><img loading="lazy" alt="upload-folder" src="/assets/images/upload-folder-success-02-8f527aa3a8d07d88c957615746852652.png" width="1271" height="375" class="img_ev3q"></p><p><img loading="lazy" alt="upload-folder" src="/assets/images/upload-folder-success-03-d4251b86ee85bd5792e199680e9bb763.png" width="1265" height="495" class="img_ev3q"></p><p><img loading="lazy" alt="upload-folder" src="/assets/images/upload-folder-success-04-ba90cf6c9b40c242cdb6e7bbd4e77ff1.png" width="1265" height="501" class="img_ev3q"></p></li><li><p>Create a user with read-only permission</p><p><img loading="lazy" alt="create-user" src="/assets/images/create-readonly-user-01-c0dfec1a26c75309bd158812dfa38440.png" width="1271" height="745" class="img_ev3q"></p><p><img loading="lazy" alt="create-user" src="/assets/images/create-readonly-user-02-2cf0cf8de540ded84b5d7adca914409e.png" width="1271" height="287" class="img_ev3q"></p></li></ol><h3 class="anchor anchorWithStickyNavbar_LWe7" id="test-tenant-isolation">Test tenant isolation<a class="hash-link" href="#test-tenant-isolation" title="Direct link to heading"></a></h3><ol><li><p>Log in as tenant minio-t2</p><p><img loading="lazy" alt="login-t2" src="/assets/images/login-minio-t2-01-05164403493b1533fd4e66907fcc4e17.png" width="1271" height="715" class="img_ev3q"></p><p><img loading="lazy" alt="login-t2" src="/assets/images/login-minio-t2-02-cb97b40d183a2c04c20d5a1583ba2448.png" width="1265" height="531" class="img_ev3q"></p></li><li><p>Only minio-t2 information is visible. You cannot see information about tenant minio-t1.</p><p><img loading="lazy" alt="only-t2" src="/assets/images/only-t2-cdc2c92d78952f8ef3dac0f0a08c5f4f.png" width="1271" height="748" class="img_ev3q"></p></li><li><p>Create bucket</p><p><img loading="lazy" alt="create-bucket" src="/assets/images/create-bucket01-5ff6c1c329b6894a95327fd058418214.png" width="1271" height="641" class="img_ev3q"></p><p><img loading="lazy" alt="create-bucket" src="/assets/images/createbucket02-c74362e3b73378315452553cca4a910d.png" width="1271" height="357" class="img_ev3q"></p></li><li><p>Create path</p><p><img loading="lazy" alt="create-path" src="/assets/images/create-path01-6301c1074307216c3715f745ad37862b.png" width="1271" height="589" class="img_ev3q"></p><p><img loading="lazy" alt="create-path" src="/assets/images/create-path02-b3875fbfee991a8c69f8627fbf8988b4.png" width="1265" height="281" class="img_ev3q"></p></li><li><p>Upload the file</p><p><img loading="lazy" alt="upload-file" src="/assets/images/upload-file01-a81dcfaf0cb69e2f3d2b4452fcc8d587.png" width="1271" height="253" class="img_ev3q"></p><p><img loading="lazy" alt="upload-file" src="/assets/images/upload-file02-688141fc03bc83b4884b1e309dc8fec3.png" width="1271" height="440" class="img_ev3q"></p></li><li><p>Create a user</p><p><img loading="lazy" alt="create-user" src="/assets/images/create-user01-fdaa9d62a2b77f01b9c25e90947d01b7.png" width="1173" height="565" class="img_ev3q"></p><p><img loading="lazy" alt="create-user" src="/assets/images/create-user02-02688ec4dcdbfd13c23bde27cbe97adb.png" width="956" height="562" class="img_ev3q"></p><p><img loading="lazy" alt="create-user" src="/assets/images/create-user03-c8e0e15d94570c56b210a807bea71dbc.png" width="1063" height="330" class="img_ev3q"></p><p><img loading="lazy" alt="create-user" src="/assets/images/create-user04-a25e1de99cff7c39c5c6074bf99b171e.png" width="1087" height="418" class="img_ev3q"></p><p><img loading="lazy" alt="create-user" src="/assets/images/create-user05-3094cf2cce3288d4b268b168376d9787.png" width="1265" height="436" class="img_ev3q"></p></li><li><p>Configure user policies</p><p><img loading="lazy" alt="user-policy" src="/assets/images/user-policy01-d7ff1a7f6daa3180766f2e3f5aadb33a.png" width="1271" height="559" class="img_ev3q"></p><p><img loading="lazy" alt="user-policy" src="/assets/images/user-policy02-52963322402c0fc498c958fc115bf05d.png" width="1271" height="482" class="img_ev3q"></p></li><li><p>Delete a bucket</p><p><img loading="lazy" alt="delete-bucket" src="/assets/images/delete-bk01-ac535d4a12f5d328317e526567bb08a2.png" width="1265" height="620" class="img_ev3q"></p><p><img loading="lazy" alt="delete-bucket" src="/assets/images/delete-bk02-59b03c470e6adf4d1cd9780c949a3e60.png" width="1265" height="666" class="img_ev3q"></p><p><img loading="lazy" alt="delete-bucket" src="/assets/images/delete-bk03-7b7bcdc79caf87744c8b91bcd9e6888f.png" width="1265" height="519" class="img_ev3q"></p><p><img loading="lazy" alt="delete-bucket" src="/assets/images/delete-bk04-3bf4c2f3cf510b65ecf9da53c8f5a5c6.png" width="1265" height="495" class="img_ev3q"></p><p><img loading="lazy" alt="delete-bucket" src="/assets/images/delete-bk05-68ca55612e200403f48078d611d8897f.png" width="1271" height="605" class="img_ev3q"></p><p><img loading="lazy" alt="delete-bucket" src="/assets/images/delete-bk06-eb4f8695cdc29d00bc1c4d59566a0525.png" width="1277" height="369" class="img_ev3q"></p></li></ol><h2 class="anchor anchorWithStickyNavbar_LWe7" id="conclusion">Conclusion<a class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p>In this test, we successfully deployed MinIO distributed object storage on the basis of Kubernetes 1.22 and
the HwameiStor local storage. We performed the basic feature test,
system security test, and operation and maintenance management test.</p><p>All tests are passed, proving HwameiStor can well support for MinIO.</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/test">Test</a></li></ul></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="title_f1Hy" itemprop="headline"><a itemprop="url" href="/blog/live">Livestream Highlights: Cloud Native Storage</a></h2><div class="container_mt6G margin-vert--md"><time datetime="2022-06-20T00:00:00.000Z" itemprop="datePublished">June 20, 2022</time> · <!-- -->9 min read</div><div class="margin-top--md margin-bottom--sm row"><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/AdaLiuyl" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">AdaLiu</span></a></div><small class="avatar__subtitle" itemprop="description">Technical Writer</small></div></div></div><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/Michelle951" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://avatars.githubusercontent.com/u/35519562?v=4" alt="Michelle Wu"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/Michelle951" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Michelle Wu</span></a></div><small class="avatar__subtitle" itemprop="description">Technical Writer</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p><img loading="lazy" alt="Livestream Highlights" src="/assets/images/highlight-en-0751c6eb4dc28d7fea0b01c674e9a5fa.png" width="1958" height="732" class="img_ev3q"></p><p>The rapid development of cloud native industry makes many things possible, but it also poses some challenges for application development and operation. As more and more stateful applications are moved onto container platforms, stateful applications have become a major consumer of storage. As a cornerstone for running applications, storage now becomes a major challenge in the process of containerization. In the era of cloud native, what are the new requirements for storage systems? What are the new opportunities and challenges facing cloud-native storage? What are the popular cloud native storage solutions?</p><p>On June 20th, 2022, we had a live discussion with <a href="https://www.pengyunnetwork.cn/#/Main" target="_blank" rel="noopener noreferrer">Pengyun Network</a> on three topics: cloud-native local storage, cloud-native storage solutions for Kubernetes, and the storage systems needed in the era of cloud native.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="hwameistor">HwameiStor<a class="hash-link" href="#hwameistor" title="Direct link to heading"></a></h2><p>As an infrastructure for containerization in cloud native stack, cloud-native storage exposes underlying storage services to containers and micro-services, and collects storage resources from different media. It can enable stateful workloads to run in containers by providing persistent volumes. CNCF's definition for cloud-native storage has three key points. First, it runs on Kubernetes as a container. Second, it uses Kubernetes object classes, mainly custom resource definition (CRD). Last and the most important, it uses a container storage interface (CSI). HwameiStor is developed based on these three points. it is an end-to-end cloud-native local storage system.</p><p><img loading="lazy" alt="HwameiStor Architecture" src="/assets/images/architect-5b800d6ed2893aea97ee9b52dd53a1a2.jpg" width="1080" height="423" class="img_ev3q"></p><p>The bottom layer of HwameiStor is a local disk manager (LDM). LDM automatically collects resources from various storage media (such as HDD, SSD and NVMe disks) to form a local storage resource pool for unified automatic management. After HwameiStor is deployed, it can allocate resources on various storage media to different pools. Above the resource pool, it uses logical volume manager (LVM) for management, It also uses the CSI architecture to provide distributed local data volume service, so as to provide data persistence capabilities for cloud-native stateful applications or components.</p><p>HwameiStor is a storage system designed for cloud native. It supports high availability, automation, rapid deployment, and high performance with low cost, making it a good alternative to expensive traditional storage area network (SAN). It has three core components:</p><ul><li><p>Local Disk Management (LDM), which uses CRD to define and manage local data disks. LDM can explicitly get the attributes, size and other information of local disks in Kubernetes.</p></li><li><p>Local Storage (LS), which uses LVM to allocate logical volumes (LV) to persistent volumes (PV) after LDM is implemented.</p></li><li><p>Scheduler, which schedules containers to nodes with local data.</p></li></ul><p>The core of HwameiStor lies in the definition and implementation of CRDs. On top of PersistentVolume (PV) and PersistentVolumeClaim (PVC) object classes in Kubernetes, HwameiStor defines a new object class that can associate PV/PVC in Kubernetes with local data disks.</p><p>HwameiStor has four features:</p><ul><li><p>Automatic operation and management: it can automatically discover, identify, manage, and allocate disks, and schedule applications and data according to affinity. It can also automatically monitor disk status and provide timely warning.</p></li><li><p>Highly available data support: HwameiStor uses cross-node replicas to synchronize data and achieve high availability. When a node goes wrong, it will automatically schedule applications to highly available data nodes to ensure application continuity.</p></li><li><p>Rich types of data volume: HwameiStor aggregates HDD, SSD, and NVMe disks to provide data services with low latency and high throughput.</p></li><li><p>Flexible and dynamic linear expansion:HwameiStor can dynamically expand according to cluster size to meet application's requirements for data persistence.</p></li></ul><p>HwameiStor is recommended in the following scenarios:</p><ul><li><p>Adapt to middlewares with a highly available architecture</p><p>Some middlewares, like Kafka, ElasticSearch and Redis, have a highly available architecture and a high requirement for IO data access. The LVM-based single-replica local data volumes provided by HwameiStor are suitable for such kind of applications.</p></li><li><p>Provide highly available data volumes for applications</p><p>MySQL and other OLTP databases require their underlying storage systems to provide highly available data storage for quick recovery. Meanwhile, data access should also have a high performance. The highly available dual-replica data volumes with can meet these requirements.</p></li><li><p>Provide automatic operation and maintenance for traditional storage software</p><p>MinIO, Ceph and other similar storage software need to use the disks on Kubernetes nodes. HwameiStor's single-replica local volumes can fast respond to the business system's needs for deployment, expansion, and migration, thus realizing automatic operation and maintenance based on Kubernetes. This kind of local volumes can be automatically used by PVC/PV through CSI drives.</p></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="zettastor-hasp">ZettaStor HASP<a class="hash-link" href="#zettastor-hasp" title="Direct link to heading"></a></h2><p>According to the CNCF 2020 Annual Report, stateful applications account for 55% of all container applications, making it a mainstream. About 29% stateful applications listed storage as the main challenge for adopting container technology. A storage problem facing cloud native scenarios is that it is difficult to balance performance and availability. Using a single type of storage cannot meet all needs. Therefore, in the actual implementation of stateful applications, data storage technology is the key.</p><p><img loading="lazy" alt="Storage Solution Comparison" src="/assets/images/compare-en-1be4f3fb58637cdfe0837ed0304acc2d.png" width="2000" height="1125" class="img_ev3q"></p><p>ZettaStor HASP is a cloud-native data aggregation & storage platform. It is also a user-state file system of high performance that supports redundancy protection based on multiple replicas across heterogeneous storage systems. Data replicas can flow between different types of storage systems, which is a big competitiveness over traditional distributed storage systems. In addition, it also supports unified and flexible orchestration of storage resources, and can be tightly integrated with container platforms.</p><p>For example:</p><p>ZettaStor HASP has a higher data access performance and can realize dynamic allocation and refined management of storage resources. This is desirable for distributed applications that have data redundancy mechanisms themselves and also require high performance, such as Kafka, Redis, MongoDB, and HDFS.</p><p>ZettaStor HASP can achieve data high availability based on cross-node redundancy protection, and meanwhile ensure high performance of local storage. This is suitable for applications that have no data redundancy mechanisms and must rely on external storage, such as MySQL, PostgreSQL.</p><ul><li>Critical business should prevent the risk of simultaneous failure of two nodes. ZettaStor HASP's replica redundancy protection across local and external storage systems can ensure smooth running of critical business.</li></ul><p><img loading="lazy" alt="ZettaStor HASP Architecture" src="/assets/images/zettastor-en-fa453f0d1028a09dfbdd32965f5deb94.png" width="2000" height="1125" class="img_ev3q"></p><p>ZettaStor HASP has a three-layer architecture. On the top is a high-performance distributed file system, which is also the core of HASP. This independently-developed file system is fully compatible with POSIX standards and supports zero data copy between user-mode and kernel-mode, giving a full play to the performance of high-speed media, such as NVMe SSD/SCM/PM. In the middle is the data service layer, which can provide services across local storage systems on different nodes, across local storage and external storage systems, and across heterogeneous external storage systems. It can be customized into single replica, multiple replicas, strong consistency, and weak consistency solutions. At the bottom is a storage management layer, which is responsible for interacting with different storage devices. It can break device barriers and connect data islands with unified data format, helping data and business get rid of device limitations. In addition, it can also schedule storage devices through CSI.</p><p>ZettaStor HASP is a distributed storage platform closely integrated with container platforms. It supports hyper-converged deployment and CSI integration. It has node affinity, and can sense the running status of user's pods, making storage behavior more adaptable.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="round-table-discussion">Round Table Discussion<a class="hash-link" href="#round-table-discussion" title="Direct link to heading"></a></h2><p>Q1: What is cloud-native storage</p><p><a href="https://github.com/alexzhc" target="_blank" rel="noopener noreferrer">alexzhc</a>: In a narrow sense, cloud-native storage need meet three standards. First, it should meet CSI specification and connect well with CS. Second, it should be deployed on Kubernetes as a container. Third, information in the storage system should create a new object class through CRDs and eventually be stored in Kubernetes.</p><p><a href="https://github.com/fengqinah" target="_blank" rel="noopener noreferrer">fengqinah</a>: Cloud-native storage has multiple features and can meet various demands. In addition to providing a unified storage platform that can offer different storage features for different applications, it should also connect CSI and establish a bridge between storage systems and Kubernetes for communication.</p><p><a href="https://github.com/niulechuan" target="_blank" rel="noopener noreferrer">niulechuan</a>:The most common cloud-native storage solutions are based on cloud storage or distributed storage. Meanwhile, some service providers are also trying to extend the special capabilities of traditional storage.</p><p>Q2: How should cloud-native storage support cloud-native applications</p><p><a href="https://github.com/fengqinah" target="_blank" rel="noopener noreferrer">fengqinah</a>: There are mainly two points. First, cloud-native storage should support features of cloud-native applications, because these features decide the application's requirements for storage. Second, it should meet CSI specifications to support special cloud native requirements.</p><p><a href="https://github.com/niulechuan" target="_blank" rel="noopener noreferrer">niulechuan</a>: From a performance perspective, cloud-native storage needs to meet all requirements of the CSI architecture, so that it can fit diverse cloud-native scenarios. In order to provide good underlying support and response guarantee for cloud-native applications, cloud-native storage needs efficient operation and maintenance. In real cases, cost, portability, and technical support should also be taken into consideration when designing a cloud-native storage solution. Like cloud-native applications, cloud-native storage also requires "elasticity". It should have elastic computing capabilities, scalable data, conversions between cold and hot data. In addition, cloud-native storage should also have an open ecosystem.</p><p>Q3: What are the similarities and differences between cloud-native storage and traditional storage? How about their advantages and disadvantages</p><p><a href="https://github.com/alexzhc" target="_blank" rel="noopener noreferrer">alexzhc</a>:Cloud-native storage is aggregated with Kubernetes after being deployed, while traditional storage is often separated from Kubernetes after being deployed. Cloud-native storage runs on Kubernetes, making it convenient to develop micro-services. If using traditional storage, developers might need to extend the storage API. However, the aggregated form may also, to a certain extent, cause the problem of Kubernetes easily spill over to storage, bringing difficulties to operation and maintenance. Besides, cloud-native storage also has problems about network sharing and disk load.</p><p><a href="https://github.com/fengqinah" target="_blank" rel="noopener noreferrer">fengqinah</a>:In external storage, storage nodes and computing nodes have a weak mutual impact. Back-end storage is generally distributed, with relatively high security and availability. However, in cloud native scenarios, only using external storage has certain disadvantages. It will increase network consumption, generate additional cost, and lack linkage with Kubernetes.</p><p>Q4: How should cloud-native storage empower traditional storage</p><p><a href="https://github.com/niulechuan" target="_blank" rel="noopener noreferrer">niulechuan</a>:This is a very urgent need. Kubernetes-native capabilities, such as deletion, creation, and expansion, are mainly implemented through CRDs. The community plays an active role in this process. At the same time, some capabilities of traditional storage have not yet been realized in cloud-native storage, such as cron jobs and observability. How to make cloud-native storage better empower traditional storage on platforms, give full play to their advantages, and further advance cloud native storage? This is a long way to go, and our team is working on this.</p><p><a href="https://github.com/alexzhc" target="_blank" rel="noopener noreferrer">alexzhc</a>: To add one more thing. To use a common way to connect Kubernetes and traditional storage, you should aggregate CSI drivers. However, although CSI defines some storage operation flows, it is an interface after all. Therefore, we should consider whether the CSI community should use CRDs to define some features of traditional storage, and whether service providers can define some high-level and special flows by CRDs? We should try to make Kubernetes more applicable in the storage field.</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/livestream">livestream</a></li></ul></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="title_f1Hy" itemprop="headline"><a itemprop="url" href="/blog/test">HwameiStor Capability, Security, Operation, and Maintenance Test</a></h2><div class="container_mt6G margin-vert--md"><time datetime="2022-06-06T00:00:00.000Z" itemprop="datePublished">June 6, 2022</time> · <!-- -->15 min read</div><div class="margin-top--md margin-bottom--sm row"><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/zhaosimon" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://avatars.githubusercontent.com/u/36882380?v=4" alt="zhaosimon"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/zhaosimon" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">zhaosimon</span></a></div><small class="avatar__subtitle" itemprop="description">Developer</small></div></div></div><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/windsonsea" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://github.com/windsonsea.png" alt="Michael Yao"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/windsonsea" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Michael Yao</span></a></div><small class="avatar__subtitle" itemprop="description">Technical Writer</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>This test environment is Kubernetes 1.22. We deployed TiDB 1.3 after the HwameiStor local storage is attached. Then, we performed the basic SQL capability test, system security test, and operation and maintenance management test.</p><p>All the tests passed successfully, it is acknowledged that HwameiStor can support distributed database application scenarios such as TiDB with high availability, strong consistency requirements, and large data scale.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="introduction-to-tidb">Introduction to TiDB<a class="hash-link" href="#introduction-to-tidb" title="Direct link to heading"></a></h2><p>TiDB is a distributed database product that supports OLTP (Online Transactional Processing), OLAP (Online Analytical Processing), and HTAP (Hybrid Transactional and Analytical Processing) services, compatible with key features such as MySQL 5.7 protocol and MySQL ecosystem. The goal of TiDB is to provide users with one-stop OLTP, OLAP, and HTAP solutions, which are suitable for various application scenarios such as high availability, strict requirements for strong consistency, and large data scale.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="tidb-architecture">TiDB architecture<a class="hash-link" href="#tidb-architecture" title="Direct link to heading"></a></h3><p>The TiDB distributed database splits the overall architecture into multiple modules that can communicate with each other. The architecture diagram is as follows:</p><p><img loading="lazy" alt="TiDB architecture" src="/assets/images/architecture-2a3f12e542dfbb4545e4e20e4da92010.png" width="1046" height="500" class="img_ev3q"></p><ul><li><p><strong>TiDB Server</strong></p><p>The SQL layer exposes the connection endpoints of the MySQL protocol to the outside world, and is responsible for accepting connections from clients, performing SQL parsing and optimization and finally generating a distributed execution plan. The TiDB layer itself is stateless. In practice, you can start several TiDB instances. A unified access address is provided externally through load-balance components (such as LVS, HAProxy, or F5), and client connections can be evenly distributed on to these TiDB instances. The TiDB server itself does not store data, but only parses SQL and forwards the actual data read request to the underlying storage node, TiKV (or TiFlash).</p></li><li><p><strong>PD (Placement Driver) Server</strong></p><p>The metadata management module across a TiDB cluster is responsible for storing the real-time data distribution of each TiKV node and the overall topology of the cluster, providing the TiDB Dashboard management and control interface, and assigning transaction IDs to distributed transactions. Placement Driver (PD) not only stores metadata, but also issues data scheduling commands to specific TiKV nodes based on the real-time data distribution status reported by TiKV nodes, which can be said to be the "brain" of the entire cluster. In addition, the PD itself is also composed of at least 3 nodes and has high availability capabilities. It is recommended to deploy an odd number of PD nodes.</p></li><li><p><strong>Storage nodes</strong></p><ul><li><p>TiKV Server: In charge of storing data. From the outside, TiKV is a distributed Key-Value storage engine that provides transactions. The basic unit for storing data is Region. Each Region is responsible for storing the data of a Key Range (the block between left-closed and right-open from StartKey to EndKey). Each TiKV node is responsible for multiple Regions. TiKV API provides native support for distributed transactions at the KV key-value pair level, and provides the levels of Snapshot Isolation (SI) by default, which is also the core of TiDB's support for distributed transactions at the SQL level. After the SQL layer of TiDB completes the SQL parsing, it will convert the SQL execution plan into the actual call to the TiKV API. Therefore, the data is stored in TiKV. In addition, the TiKV data will be automatically maintained in multiple replicas (the default is three replicas), which naturally supports high availability and automatic failover.</p></li><li><p>TiFlash is a special storage node. Unlike ordinary TiKV nodes, data is stored in columns in TiFlash, and the main function is to accelerate analysis-based scenarios.</p></li></ul></li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="tidb-database-storage">TiDB database storage<a class="hash-link" href="#tidb-database-storage" title="Direct link to heading"></a></h3><p><img loading="lazy" alt="TiDB database storage" src="/assets/images/storage-a293b3e63ad176d606e42501e0048276.png" width="1923" height="1779" class="img_ev3q"></p><ul><li><p><strong>Key-Value Pair</strong></p><p>The choice of TiKV is the Key-Value model that provides an ordered traversal method. Two key points of TiKV data storage are:</p><ul><li><p>A huge Map (comparable to std::map in C++) that stores Key-Value Pairs.</p></li><li><p>The Key-Value pairs in this Map are sorted by the binary order of the Key, that is, you can seek to the position of a certain Key, and then continuously call the Next method to obtain the Key-Value larger than this Key in an ascending order.</p></li></ul></li><li><p><strong>Local storage (Rocks DB)</strong></p><p>In any persistent storage engine, data must be saved on disk after all, and TiKV is not different. However, TiKV does not choose to write data directly to the disk, but stores the data in RocksDB, and RocksDB is responsible for the specific data storage. The reason is that developing a stand-alone storage engine requires a lot of work, especially to make a high-performance stand-alone engine, which may require various meticulous optimizations. RocksDB is a very good stand-alone KV storage engine open sourced by Facebook. It can meet various requirements of TiKV for single engine. Here we can simply consider that RocksDB is a persistent Key-Value Map on a host.</p></li><li><p><strong>Raft protocol</strong></p><p>TiKV uses the Raft algorithm to ensure that data is not lost and error-free when a single host fails. In short, it is to replicate data to multiple hosts, so that if one host cannot provide services, replicas on other hosts can still provide services. This data replication scheme is reliable and efficient, and can deal with replica failures.</p></li><li><p><strong>Region</strong></p><p>TiKV divides the Range by Key. A certain segment of consecutive Keys are stored on a storage node. Divide the entire Key-Value space into many segments, each segment is a series of consecutive Keys, called a Region. Try to keep the data saved in each Region within a reasonable size. Currently, the default in TiKV is no more than 96 MB. Each Region can be described by a left-closed and right-open block such as <!-- -->[StartKey, EndKey]<!-- -->.</p></li><li><p><strong>MVCC</strong></p><p>TiKV implements Multi-Version Concurrency Control (MVCC).</p></li><li><p><strong>Distributed ACID transactions</strong></p><p>TiKV uses the transaction model used by Google in BigTable: Percolator.</p></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="build-the-test-environment">Build the test environment<a class="hash-link" href="#build-the-test-environment" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="kubernetes-cluster">Kubernetes cluster<a class="hash-link" href="#kubernetes-cluster" title="Direct link to heading"></a></h3><p>In this test, we use three VM nodes to deploy the Kubernetes cluster, including one master node and two worker nodes. Kubelete version is 1.22.0.</p><p><img loading="lazy" alt="k8s cluster" src="/assets/images/k8scluster-109d22938707ca1088d83020079a39da.png" width="1923" height="410" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="hwameistor-local-storage">HwameiStor local storage<a class="hash-link" href="#hwameistor-local-storage" title="Direct link to heading"></a></h3><ol><li><p>Deploy the HwameiStor local storage in the Kubernetes cluster</p><p><img loading="lazy" alt="HwameiStor local storage" src="/assets/images/hwameistor-b1534b2445747773ba035b59d9a2e4d9.png" width="900" height="383" class="img_ev3q"></p></li><li><p>Configure a 100G local disk, sdb, for HwameiStor on two worker nodes respectively</p><p><img loading="lazy" alt="sdb1" src="/assets/images/sdb1-4d636d1f52a5d9c0c62e6850b5144a43.png" width="1156" height="266" class="img_ev3q"></p><p><img loading="lazy" alt="sdb2" src="/assets/images/sdb2-3ced8000888d850b499d6265ae87f496.png" width="2006" height="790" class="img_ev3q"></p></li><li><p>Create StorageClass</p><p><img loading="lazy" alt="create StorageClass" src="/assets/images/storageclass-63ede689f512ecd9ee5424ca6f7da52a.png" width="2175" height="182" class="img_ev3q"></p></li></ol><h3 class="anchor anchorWithStickyNavbar_LWe7" id="deploy-tidb-on-kubernetes">Deploy TiDB on Kubernetes<a class="hash-link" href="#deploy-tidb-on-kubernetes" title="Direct link to heading"></a></h3><p>TiDB can be deployed on Kubernetes using TiDB Operator. TiDB Operator is an automatic operation and maintenance system for TiDB clusters on Kubernetes. It provides full lifecycle management of TiDB including deployment, upgrade, scaling, backup and recovery, and configuration changes. With TiDB Operator, TiDB can run seamlessly on public cloud or privately deployed Kubernetes clusters.</p><p>The compatibility between TiDB and TiDB Operator versions is as follows:</p><table><thead><tr><th>TiDB version</th><th>Applicable versions of TiDB Operator</th></tr></thead><tbody><tr><td>dev</td><td>dev</td></tr><tr><td>TiDB >= 5.4</td><td>1.3</td></tr><tr><td>5.1 <= TiDB < 5.4</td><td>1.3 (recommended), 1.2</td></tr><tr><td>3.0 <= TiDB < 5.1</td><td>1.3 (recommended), 1.2, 1.1</td></tr><tr><td>2.1 <= TiDB < 3.0</td><td>1.0 (maintenance stopped)</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="deploy-tidb-operator">Deploy TiDB Operator<a class="hash-link" href="#deploy-tidb-operator" title="Direct link to heading"></a></h4><ol><li><p>Install TiDB CRDs</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/manifests/crd.yaml</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></li><li><p>Install TiDB Operator</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">helm repo </span><span class="token function" style="color:#d73a49">add</span><span class="token plain"> pingcap https://charts.pingcap.org/ </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">kubectl create namespace tidb-admin </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">helm </span><span class="token function" style="color:#d73a49">install</span><span class="token plain"> --namespace tidb-admin tidb-operator pingcap/tidb-operator --version v1.3.2 </span><span class="token punctuation" style="color:#393A34">\</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">--set </span><span class="token assign-left variable" style="color:#36acaa">operatorImage</span><span class="token operator" style="color:#393A34">=</span><span class="token plain">registry.cn-beijing.aliyuncs.com/tidb/tidb-operator:v1.3.2 </span><span class="token punctuation" style="color:#393A34">\</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">--set </span><span class="token assign-left variable" style="color:#36acaa">tidbBackupManagerImage</span><span class="token operator" style="color:#393A34">=</span><span class="token plain">registry.cn-beijing.aliyuncs.com/tidb/tidb-backup-manager:v1.3.2 </span><span class="token punctuation" style="color:#393A34">\</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">--set scheduler.kubeSchedulerImageName</span><span class="token operator" style="color:#393A34">=</span><span class="token plain">registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></li><li><p>Check TiDB Operator components</p><p><img loading="lazy" alt="check TiDB Operator components" src="/assets/images/check-ab733dc3ff2b22eb313f91d9095bb2cb.png" width="2505" height="207" class="img_ev3q"></p></li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="deploy-the-tidb-cluster">Deploy the TiDB cluster<a class="hash-link" href="#deploy-the-tidb-cluster" title="Direct link to heading"></a></h4><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl create namespace tidb-cluster </span><span class="token operator" style="color:#393A34">&&</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">\</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">kubectl -n tidb-cluster apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/examples/basic/tidb-cluster.yaml </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">kubectl -n tidb-cluster apply -f https://raw.githubusercontent.com /pingcap/tidb-operator/master/examples/basic/tidb-monitor.yaml</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="deploy TiDB cluster" src="/assets/images/deploytidb-a91346d128e05f23ae69c262e62c9227.png" width="2498" height="354" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="connect-the-tidb-cluster">Connect the TiDB cluster<a class="hash-link" href="#connect-the-tidb-cluster" title="Direct link to heading"></a></h4><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">yum -y </span><span class="token function" style="color:#d73a49">install</span><span class="token plain"> mysql-client</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="connect tidb" src="/assets/images/connecttidb-a7581718045137e665d6661f70cfa7ec.png" width="2430" height="719" class="img_ev3q"></p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl port-forward -n tidb-cluster svc/basic-tidb </span><span class="token number" style="color:#36acaa">4000</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">></span><span class="token plain"> pf4000.out </span><span class="token operator" style="color:#393A34">&</span><span class="token plain"> </span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="connect TiDB cluster" src="/assets/images/connect1-be6b13647b17742c3a967b3e8829749e.png" width="1420" height="68" class="img_ev3q"></p><p><img loading="lazy" alt="connect tidb cluster" src="/assets/images/connect2-7c52ba62c2f250f12ed495cfa5fd1cb8.png" width="604" height="152" class="img_ev3q"></p><p><img loading="lazy" alt="connect TiDB cluster" src="/assets/images/connect3-abfb57d8b142dfffe9a51c08bd1b2b49.png" width="2499" height="749" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="check-and-verify-the-tidb-cluster-status">Check and verify the TiDB cluster status<a class="hash-link" href="#check-and-verify-the-tidb-cluster-status" title="Direct link to heading"></a></h4><ol><li><p>Create the Hello_world table</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">create</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">table</span><span class="token plain"> hello_world </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id </span><span class="token keyword" style="color:#00009f">int</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">unsigned</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">not</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">null</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">auto_increment</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">primary</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">key</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> v </span><span class="token keyword" style="color:#00009f">varchar</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">32</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="create Hello_world table" src="/assets/images/helloworld-d916ce6e1f0e069e5d4acb776b444962.png" width="1266" height="807" class="img_ev3q"></p></li><li><p>Check the TiDB version</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> tidb_version</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain">\G</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="check version" src="/assets/images/checkversion-e0586d069d8cdb100ba172e2836fb92d.png" width="1042" height="434" class="img_ev3q"></p></li><li><p>Check the Tikv storage status</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> information_schema</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">tikv_store_status\G</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="check storage" src="/assets/images/checkstorage-be130e7558ea12ef380164e5bd33f2e8.png" width="1190" height="884" class="img_ev3q"></p></li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="configure-the-hwameistor-storage">Configure the HwameiStor storage<a class="hash-link" href="#configure-the-hwameistor-storage" title="Direct link to heading"></a></h4><p>Create a PVC for tidb-tikv and tidb-pd from <code>storageClass local-storage-hdd-lvm</code>:</p><p><img loading="lazy" alt="HwameiStor storage config" src="/assets/images/pvc-72ff9e3fbbb8ab8087d52ab36dd732f7.png" width="2498" height="248" class="img_ev3q"></p><p><img loading="lazy" alt="pvc1" src="/assets/images/pvc1-bc1017044ab502ea1ff3c21be110a088.png" width="1261" height="1438" class="img_ev3q"></p><p><img loading="lazy" alt="pvc2" src="/assets/images/pvc2-307ff6e797cde3b258136d935454b343.png" width="787" height="954" class="img_ev3q"></p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl get po basic-tikv-0 -oyaml</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="mountpvc" src="/assets/images/mountpvc-8fd83543e55e5781e6ca1cf5a5b549c6.png" width="1021" height="1430" class="img_ev3q"></p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">kubectl get po basic-pd-0 -oyaml</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><img loading="lazy" alt="mountpvc1" src="/assets/images/mountpvc1-d2d7077971a2980378654c8e06afee2c.png" width="1154" height="1454" class="img_ev3q"></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="test-procedure">Test procedure<a class="hash-link" href="#test-procedure" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="basic-sql-capability-test">Basic SQL capability test<a class="hash-link" href="#basic-sql-capability-test" title="Direct link to heading"></a></h3><p>After the database cluster is deployed, we performed the following tests about basic capabilities. All are successfully passed.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="distributed-transaction">Distributed transaction<a class="hash-link" href="#distributed-transaction" title="Direct link to heading"></a></h4><p>Test purpose: In the case of multiple isolation levels, check if the completeness constraints of distributed data operations are supported, such as atomicity, consistency, isolation, and durability (ACID)</p><p>Test steps:</p><ol><li><p>Create the database: testdb</p></li><li><p>Create the table <code>t_test ( id int AUTO_INCREMENT, name varchar(32), PRIMARY KEY (id) )</code></p></li><li><p>Run a test script</p></li></ol><p>Test result: The completeness constraints of distributed data operations are supported, such as atomicity, consistency, isolation, and durability (ACID), in the case of multiple isolation levels</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="object-isolation">Object isolation<a class="hash-link" href="#object-isolation" title="Direct link to heading"></a></h4><p>Test purpose: Check if the object isolation can be implemented by using different schemas</p><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">create</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">database</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">if</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">not</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">exists</span><span class="token plain"> testdb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">use</span><span class="token plain"> testdb</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">create</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">table</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">if</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">not</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">exists</span><span class="token plain"> t_test</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain"> id </span><span class="token keyword" style="color:#00009f">bigint</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> name </span><span class="token keyword" style="color:#00009f">varchar</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">200</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> sale_time </span><span class="token keyword" style="color:#00009f">datetime</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">default</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">current_timestamp</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token keyword" style="color:#00009f">constraint</span><span class="token plain"> pk_t_test </span><span class="token keyword" style="color:#00009f">primary</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">key</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">insert</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">into</span><span class="token plain"> t_test</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">name</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">values</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">1</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'a'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">,</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">2</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'b'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">,</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">3</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'c'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">create</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'readonly'</span><span class="token variable" style="color:#36acaa">@'%'</span><span class="token plain"> identified </span><span class="token keyword" style="color:#00009f">by</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"readonly"</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">grant</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> testdb</span><span class="token punctuation" style="color:#393A34">.</span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">to</span><span class="token plain"> readonly</span><span class="token variable" style="color:#36acaa">@'%'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> testdb</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">t_test</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">update</span><span class="token plain"> testdb</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">t_test </span><span class="token keyword" style="color:#00009f">set</span><span class="token plain"> name</span><span class="token operator" style="color:#393A34">=</span><span class="token string" style="color:#e3116c">'aaa'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">create</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'otheruser'</span><span class="token variable" style="color:#36acaa">@'%'</span><span class="token plain"> identified </span><span class="token keyword" style="color:#00009f">by</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"otheruser"</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: Supported to create different schemas to implement the object isolation</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="table-operation-support">Table operation support<a class="hash-link" href="#table-operation-support" title="Direct link to heading"></a></h4><p>Test purpose: Check if you can create, delete, and modifiy table data, DML, columns, partition table</p><p>Test steps: Run the test scripts step by step after connecting the database</p><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#999988;font-style:italic"># Create and delete table</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">drop</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">table</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">if</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">exists</span><span class="token plain"> t_test</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">create</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">table</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">if</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">not</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">exists</span><span class="token plain"> t_test</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain"> id </span><span class="token keyword" style="color:#00009f">bigint</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">default</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'0'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> name </span><span class="token keyword" style="color:#00009f">varchar</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">200</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">default</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">''</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> sale_time </span><span class="token keyword" style="color:#00009f">datetime</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">default</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">current_timestamp</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token keyword" style="color:#00009f">constraint</span><span class="token plain"> pk_t_test </span><span class="token keyword" style="color:#00009f">primary</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">key</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#999988;font-style:italic"># Delete and modify</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">insert</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">into</span><span class="token plain"> t_test</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">name</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">values</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">1</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'a'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">,</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">2</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'b'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">,</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">3</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'c'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">,</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">4</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'d'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">,</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">5</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'e'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">update</span><span class="token plain"> t_test </span><span class="token keyword" style="color:#00009f">set</span><span class="token plain"> name</span><span class="token operator" style="color:#393A34">=</span><span class="token string" style="color:#e3116c">'aaa'</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> id</span><span class="token operator" style="color:#393A34">=</span><span class="token number" style="color:#36acaa">1</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">update</span><span class="token plain"> t_test </span><span class="token keyword" style="color:#00009f">set</span><span class="token plain"> name</span><span class="token operator" style="color:#393A34">=</span><span class="token string" style="color:#e3116c">'bbb'</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> id</span><span class="token operator" style="color:#393A34">=</span><span class="token number" style="color:#36acaa">2</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">delete</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> t_dml </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> id</span><span class="token operator" style="color:#393A34">=</span><span class="token number" style="color:#36acaa">5</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#999988;font-style:italic"># Modify, add, delete columns</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">alter</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">table</span><span class="token plain"> t_test </span><span class="token keyword" style="color:#00009f">modify</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">column</span><span class="token plain"> name </span><span class="token keyword" style="color:#00009f">varchar</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">250</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">alter</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">table</span><span class="token plain"> t_test </span><span class="token keyword" style="color:#00009f">add</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">column</span><span class="token plain"> col </span><span class="token keyword" style="color:#00009f">varchar</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">255</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">insert</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">into</span><span class="token plain"> t_test</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">name</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">col</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">values</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">10</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'test'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'new_col'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">alter</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">table</span><span class="token plain"> t_test </span><span class="token keyword" style="color:#00009f">add</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">column</span><span class="token plain"> colwithdefault </span><span class="token keyword" style="color:#00009f">varchar</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">255</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">default</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'aaaa'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">insert</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">into</span><span class="token plain"> t_test</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">name</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">values</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">20</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'testdefault'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">insert</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">into</span><span class="token plain"> t_test</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">name</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">colwithdefault </span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">values</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">10</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'test'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'non-default '</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">alter</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">table</span><span class="token plain"> t_test </span><span class="token keyword" style="color:#00009f">drop</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">column</span><span class="token plain"> colwithdefault</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#999988;font-style:italic"># Type of partition table (only listed part of scripts)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">CREATE</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">TABLE</span><span class="token plain"> employees </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> id </span><span class="token keyword" style="color:#00009f">INT</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">NOT</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">NULL</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">fname </span><span class="token keyword" style="color:#00009f">VARCHAR</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">30</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">lname </span><span class="token keyword" style="color:#00009f">VARCHAR</span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">30</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> hired </span><span class="token keyword" style="color:#00009f">DATE</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">NOT</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">NULL</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">DEFAULT</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'1970-01-01'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> separated </span><span class="token keyword" style="color:#00009f">DATE</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">NOT</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">NULL</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">DEFAULT</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'9999-12-31'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">job_code </span><span class="token keyword" style="color:#00009f">INT</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">NOT</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">NULL</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">store_id </span><span class="token keyword" style="color:#00009f">INT</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">NOT</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">NULL</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">)</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: Supported to create, delete, and modifiy table data, DML, columns, partition table</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="index-support">Index support<a class="hash-link" href="#index-support" title="Direct link to heading"></a></h4><p>Test purpose: Verify different indexes (unique, clustered, partitioned, Bidirectional indexes, Expression-based indexes, hash indexes, etc.) and index rebuild operations.</p><p>Test script:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">alter table t_test </span><span class="token function" style="color:#d73a49">add</span><span class="token plain"> unique index udx_t_test </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">name</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#999988;font-style:italic"># The default is clustered index of primary key</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">ADMIN CHECK TABLE t_test</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">create index time_idx on t_test</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">sale_time</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">alter table t_test drop index time_idx</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">admin show ddl </span><span class="token function" style="color:#d73a49">jobs</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">admin show ddl job queries </span><span class="token number" style="color:#36acaa">156</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">create index time_idx on t_test</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">sale_time</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: Supported to create, delete, combine, and list indexes and supported for unique index</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="statements">Statements<a class="hash-link" href="#statements" title="Direct link to heading"></a></h4><p>Test purpose: Check if the statements in distributed databases are supported such as <code>if</code>, <code>case when</code>, <code>for loop</code>, <code>while loop</code>, <code>loop exit when</code> (up to 5 kinds)</p><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">SELECT</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">CASE</span><span class="token plain"> id </span><span class="token keyword" style="color:#00009f">WHEN</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">1</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">THEN</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'first'</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">WHEN</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">2</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">THEN</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'second'</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">ELSE</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'OTHERS'</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">END</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">AS</span><span class="token plain"> id_new </span><span class="token keyword" style="color:#00009f">FROM</span><span class="token plain"> t_test</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">SELECT</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">IF</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token operator" style="color:#393A34">></span><span class="token number" style="color:#36acaa">2</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'int2+'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'int2-'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> t_test</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: supported for statements such as <code>if</code>, <code>case when</code>, <code>for loop</code>, <code>while loop</code>, and <code>loop exit when</code> (up to 5 kinds)</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="parsing-execution-plan">Parsing execution plan<a class="hash-link" href="#parsing-execution-plan" title="Direct link to heading"></a></h4><p>Test purpose: Check if execution plan parsing is supported for distributed databases</p><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">explain</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">analyze</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> t_test </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> id </span><span class="token operator" style="color:#393A34">NOT</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">IN</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token number" style="color:#36acaa">1</span><span class="token punctuation" style="color:#393A34">,</span><span class="token number" style="color:#36acaa">2</span><span class="token punctuation" style="color:#393A34">,</span><span class="token number" style="color:#36acaa">4</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">explain</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">analyze</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> t_test a </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">EXISTS</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> t_test b </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> a</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">id</span><span class="token operator" style="color:#393A34">=</span><span class="token plain">b</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">id </span><span class="token operator" style="color:#393A34">and</span><span class="token plain"> b</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">id</span><span class="token operator" style="color:#393A34"><</span><span class="token number" style="color:#36acaa">3</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">explain</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">analyze</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">SELECT</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">IF</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token operator" style="color:#393A34">></span><span class="token number" style="color:#36acaa">2</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'int2+'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token string" style="color:#e3116c">'int2-'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> t_test</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: the execution plan is supported to parse</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="binding-execution-plan">Binding execution plan<a class="hash-link" href="#binding-execution-plan" title="Direct link to heading"></a></h4><p>Test purpose: Verify the feature of binding execution plan for distributed databases</p><p>Test steps:</p><ol><li><p>View the current execution plan of sql statements</p></li><li><p>Use the binding feature</p></li><li><p>View the execution plan after the sql statement is binded</p></li><li><p>Delete the binding</p></li></ol><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">explain</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> employees3 a </span><span class="token keyword" style="color:#00009f">join</span><span class="token plain"> employees4 b </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> a</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">id </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> b</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">id </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> a</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">lname</span><span class="token operator" style="color:#393A34">=</span><span class="token string" style="color:#e3116c">'Johnson'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">explain</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token comment" style="color:#999988;font-style:italic">/*+ hash_join(a,b) */</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> employees3 a </span><span class="token keyword" style="color:#00009f">join</span><span class="token plain"> employees4 b </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> a</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">id </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> b</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">id </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> a</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">lname</span><span class="token operator" style="color:#393A34">=</span><span class="token string" style="color:#e3116c">'Johnson'</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: It may not be hash_join when hint is not used, and it must be hash_join after hint is used.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="common-functions">Common functions<a class="hash-link" href="#common-functions" title="Direct link to heading"></a></h4><p>Test purpose: Verify standard functions of distributed databases</p><p>Test result: Standard database functions are supported</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="explicitimplicit-transactions">Explicit/implicit transactions<a class="hash-link" href="#explicitimplicit-transactions" title="Direct link to heading"></a></h4><p>Test purpose: Verify the transaction support of distributed databases</p><p>Test result: Explict and implicit transactions are supported</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="character-set">Character set<a class="hash-link" href="#character-set" title="Direct link to heading"></a></h4><p>Test purpose: Verify the data types supported by distributed database</p><p>Test result: Only the UTF-8 mb4 character set is supported now</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="lock-support">Lock support<a class="hash-link" href="#lock-support" title="Direct link to heading"></a></h4><p>Test purpose: Verify the lock implementation of distributed databases</p><p>Test result: Described how the lock is implemented, what are blockage conditions in the case of R-R/R-W/W-W, and how the deadlock is handled</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="isolation-levels">Isolation levels<a class="hash-link" href="#isolation-levels" title="Direct link to heading"></a></h4><p>Test purpose: Verify the transactional isolation levels of distributed databases</p><p>Test result: Supported for si and rc isolation levels (4.0 GA version)</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="distributed-complex-query">Distributed complex query<a class="hash-link" href="#distributed-complex-query" title="Direct link to heading"></a></h4><p>Test purpose: Verify the complex query capabilities of distributed databases</p><p>Test result: Supported for the distributed complex queries and operations such as inter-node joins, and supported for window functions and hierarchical queries</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="system-security-test">System security test<a class="hash-link" href="#system-security-test" title="Direct link to heading"></a></h3><p>This section describes system security tests. After the database cluster is deployed, all the following tests are passed.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="account-management-and-permission-test">Account management and permission test<a class="hash-link" href="#account-management-and-permission-test" title="Direct link to heading"></a></h4><p>Test purpose: Verify the accout permisson management of distributed databases</p><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> host</span><span class="token punctuation" style="color:#393A34">,</span><span class="token keyword" style="color:#00009f">user</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">authentication_string </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> mysql</span><span class="token punctuation" style="color:#393A34">.</span><span class="token keyword" style="color:#00009f">user</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">create</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> tidb IDENTIFIED </span><span class="token keyword" style="color:#00009f">by</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'tidb'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> host</span><span class="token punctuation" style="color:#393A34">,</span><span class="token keyword" style="color:#00009f">user</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">authentication_string </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> mysql</span><span class="token punctuation" style="color:#393A34">.</span><span class="token keyword" style="color:#00009f">user</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">set</span><span class="token plain"> password </span><span class="token keyword" style="color:#00009f">for</span><span class="token plain"> tidb </span><span class="token operator" style="color:#393A34">=</span><span class="token plain">password</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">'tidbnew'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> host</span><span class="token punctuation" style="color:#393A34">,</span><span class="token keyword" style="color:#00009f">user</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">authentication_string</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">Select_priv </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> mysql</span><span class="token punctuation" style="color:#393A34">.</span><span class="token keyword" style="color:#00009f">user</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">grant</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token punctuation" style="color:#393A34">.</span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">to</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">flush </span><span class="token keyword" style="color:#00009f">privileges</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> host</span><span class="token punctuation" style="color:#393A34">,</span><span class="token keyword" style="color:#00009f">user</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">authentication_string</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain">Select_priv </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> mysql</span><span class="token punctuation" style="color:#393A34">.</span><span class="token keyword" style="color:#00009f">user</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">grant</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">all</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">privileges</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token punctuation" style="color:#393A34">.</span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">to</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">flush </span><span class="token keyword" style="color:#00009f">privileges</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> mysql</span><span class="token punctuation" style="color:#393A34">.</span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token operator" style="color:#393A34">=</span><span class="token string" style="color:#e3116c">'tidb'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">revoke</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token punctuation" style="color:#393A34">.</span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">flush </span><span class="token keyword" style="color:#00009f">privileges</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">revoke</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">all</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">privileges</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token punctuation" style="color:#393A34">.</span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">flush </span><span class="token keyword" style="color:#00009f">privileges</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">grant</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">select</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">id</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> test</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">TEST_HOTSPOT </span><span class="token keyword" style="color:#00009f">to</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">drop</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test results:</p><ul><li><p>Supported for creating, modifying, and deleting accounts, and configuring passwords, and supported for the separation of security, audit, and data management</p></li><li><p>Based on different accounts, various permission control for database includes: instance, library, table, and column</p></li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="access-control">Access control<a class="hash-link" href="#access-control" title="Direct link to heading"></a></h4><p>Test purpose: Verify the permission access control of distributed databases, and control the database data by granting basic CRUD (create, read, update, and delete) permissions</p><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">mysql </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">u root </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">h </span><span class="token number" style="color:#36acaa">172.17</span><span class="token number" style="color:#36acaa">.49</span><span class="token number" style="color:#36acaa">.222</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">P </span><span class="token number" style="color:#36acaa">4000</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">drop</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">drop</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> tidb1</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">create</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> tidb IDENTIFIED </span><span class="token keyword" style="color:#00009f">by</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'tidb'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">grant</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">.</span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">to</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">grant</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">insert</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">.</span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">to</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">grant</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">update</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">.</span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">to</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">grant</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">delete</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">on</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">.</span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">to</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">flush </span><span class="token keyword" style="color:#00009f">privileges</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">show</span><span class="token plain"> grants </span><span class="token keyword" style="color:#00009f">for</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">exit</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">mysql </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">u tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">h </span><span class="token number" style="color:#36acaa">172.17</span><span class="token number" style="color:#36acaa">.49</span><span class="token number" style="color:#36acaa">.222</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">ptidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">P </span><span class="token number" style="color:#36acaa">4000</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">D tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">e </span><span class="token string" style="color:#e3116c">'select * from aa;'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">mysql </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">u tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">h </span><span class="token number" style="color:#36acaa">172.17</span><span class="token number" style="color:#36acaa">.49</span><span class="token number" style="color:#36acaa">.222</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">ptidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">P </span><span class="token number" style="color:#36acaa">4000</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">D tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">e </span><span class="token string" style="color:#e3116c">'insert into aa values(2);'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">mysql </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">u tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">h </span><span class="token number" style="color:#36acaa">172.17</span><span class="token number" style="color:#36acaa">.49</span><span class="token number" style="color:#36acaa">.222</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">ptidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">P </span><span class="token number" style="color:#36acaa">4000</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">D tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">e </span><span class="token string" style="color:#e3116c">'update aa set id=3;'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">mysql </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">u tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">h </span><span class="token number" style="color:#36acaa">172.17</span><span class="token number" style="color:#36acaa">.49</span><span class="token number" style="color:#36acaa">.222</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">ptidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">P </span><span class="token number" style="color:#36acaa">4000</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">D tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">e </span><span class="token string" style="color:#e3116c">'delete from aa where id=3;'</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: Database data is controlled by granting the basic CRUD permissions</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="whitelist">Whitelist<a class="hash-link" href="#whitelist" title="Direct link to heading"></a></h4><p>Test purpose: Verify the whitelist feature of distributed databases</p><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">mysql </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">u root </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">h </span><span class="token number" style="color:#36acaa">172.17</span><span class="token number" style="color:#36acaa">.49</span><span class="token number" style="color:#36acaa">.102</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">P </span><span class="token number" style="color:#36acaa">4000</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">drop</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> tidb</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">create</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> tidb</span><span class="token variable" style="color:#36acaa">@'127.0.0.1'</span><span class="token plain"> IDENTIFIED </span><span class="token keyword" style="color:#00009f">by</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'tidb'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">flush </span><span class="token keyword" style="color:#00009f">privileges</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> mysql</span><span class="token punctuation" style="color:#393A34">.</span><span class="token keyword" style="color:#00009f">user</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">user</span><span class="token operator" style="color:#393A34">=</span><span class="token string" style="color:#e3116c">'tidb'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">mysql </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">u tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">h </span><span class="token number" style="color:#36acaa">127.0</span><span class="token number" style="color:#36acaa">.0</span><span class="token number" style="color:#36acaa">.1</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">P </span><span class="token number" style="color:#36acaa">4000</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">ptidb</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">mysql </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">u tidb </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">h </span><span class="token number" style="color:#36acaa">172.17</span><span class="token number" style="color:#36acaa">.49</span><span class="token number" style="color:#36acaa">.102</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">P </span><span class="token number" style="color:#36acaa">4000</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">-</span><span class="token plain">ptidb</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: Supported for the IP whitelist feature and supportred for matching actions with IP segments</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="operation-log">Operation log<a class="hash-link" href="#operation-log" title="Direct link to heading"></a></h4><p>Test purpose: Verify the monitor capability to distributed databases</p><p>Test script: <code>kubectl -ntidb-cluster logs tidb-test-pd-2 --tail 22</code></p><p>Test result: Record key actions or misoperations performed by users through the operation and maintenance management console or API</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="operation-and-maintenance-test">Operation and maintenance test<a class="hash-link" href="#operation-and-maintenance-test" title="Direct link to heading"></a></h3><p>This section describes the operation and maintenance test. After the database cluster is deployed, the following operation and maintenance tests are all passed.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="import-and-export-data">Import and export data<a class="hash-link" href="#import-and-export-data" title="Direct link to heading"></a></h4><p>Test purpose: Verify the tools support for importing and exporting data of distributed databases</p><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">*</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> sbtest1 </span><span class="token keyword" style="color:#00009f">into</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">outfile</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'/sbtest1.csv'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">load</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">data</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">local</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">infile</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'/sbtest1.csv'</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">into</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">table</span><span class="token plain"> test100</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: Supported for importing and exporting table, schema, and database</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="slow-log-query">Slow log query<a class="hash-link" href="#slow-log-query" title="Direct link to heading"></a></h4><p>Test purpose: Get the SQL info by slow query</p><p>Prerequisite: The SQL execution time shall be longer than the configured threshold for slow query, and the SQL execution is completed</p><p>Test steps:</p><ol><li><p>Adjust the slow query threshold to 100 ms</p></li><li><p>Run SQL</p></li><li><p>View the slow query info from log, system table, or dashboard</p></li></ol><p>Test script:</p><div class="language-sql codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sql codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">show</span><span class="token plain"> variables </span><span class="token operator" style="color:#393A34">like</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'tidb_slow_log_threshold'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">set</span><span class="token plain"> tidb_slow_log_threshold</span><span class="token operator" style="color:#393A34">=</span><span class="token number" style="color:#36acaa">100</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">select</span><span class="token plain"> query_time</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> query </span><span class="token keyword" style="color:#00009f">from</span><span class="token plain"> information_schema</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">slow_query </span><span class="token keyword" style="color:#00009f">where</span><span class="token plain"> is_internal </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">false</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">order</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">by</span><span class="token plain"> query_time </span><span class="token keyword" style="color:#00009f">desc</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">limit</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">3</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Test result: Can get the slow query info.</p><p>For details about test data, see <a target="_blank" href="/assets/files/TiDBonHwameiStor-906bfd680bcfe09f47e9c9e5ed8bc3ec.docx">TiDB on HwameiStor Deployment and Test Logs</a>.</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/test">Test</a></li></ul></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="title_f1Hy" itemprop="headline"><a itemprop="url" href="/blog/3">LV and LVReplica</a></h2><div class="container_mt6G margin-vert--md"><time datetime="2022-05-24T00:00:00.000Z" itemprop="datePublished">May 24, 2022</time> · <!-- -->5 min read</div><div class="margin-top--md margin-bottom--sm row"><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/niulechuan" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://avatars.githubusercontent.com/u/81207605?v=4" alt="Lechuan Niu"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/niulechuan" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Lechuan Niu</span></a></div><small class="avatar__subtitle" itemprop="description">Developer</small></div></div></div><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/Michelle951" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://avatars.githubusercontent.com/u/35519562?v=4" alt="Michelle Wu"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/Michelle951" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Michelle Wu</span></a></div><small class="avatar__subtitle" itemprop="description">Technical Writer</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>In Kubernetes, when a PVC is created and uses HwameiStor as its local storage, HwameiStor will create two kinds of CR: <code>LocalVolume</code> and <code>LocalVolumeReplica</code>. Why create these two resources for one PV? Continue to read and you will find the answer.</p><p><img loading="lazy" alt="LV Replicas" src="/assets/images/lv_replicas_en-b8df5dbb116d4022b977b52e573d7bc2.png" width="1838" height="1146" class="img_ev3q"></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="localvolume">LocalVolume<a class="hash-link" href="#localvolume" title="Direct link to heading"></a></h2><p><code>LocalVolume</code> is a CRD defined by HwameiStor. It is the volume that HwameiStor provides for users. Each <code>LocalVolume</code> corresponds to a <code>PersistentVolume</code> of Kubernetes. Both are volumes, but <code>LocalVolume</code> stores HwameiStor-related information, while the other records information about Kubernetes itself and links it to <code>LocalVolume</code>.</p><p>You can check details of <code>LocalVolume</code> with this command:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain"># check status of local volume and volume replica</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">$ kubectl get lv # or localvolume</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">NAME POOL KIND REPLICAS CAPACITY ACCESSIBILITY STATE RESOURCE PUBLISHED AGE</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">pvc-996b05e8-80f2-4240-ace4-5f5f250310e2 LocalStorage_PoolHDD LVM 1 1073741824 k8s-node1 Ready -1 22m</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Now that HwameiStor can use <code>LocalVolume</code> to provide a volume, why do we still need <code>LocalVolumeReplica</code>?</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="localvolumereplica">LocalVolumeReplica<a class="hash-link" href="#localvolumereplica" title="Direct link to heading"></a></h2><p><code>LocalVolumeReplica</code> is another CRD defined by HwameiStor. It represents a replica of a volume.</p><p>In HwameiStor, <code>LocalVolume</code> can specify one of its <code>LocalVolumeReplica</code> as the active replica. As a volume, <code>LocalVolume</code> can have many <code>LocalVolumeReplica</code> as its replicas. The replica in active state will be mounted by applications and others will stand by as high available replicas.</p><p>You can check details of <code>LocalVolumeReplica</code> with this command:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">$ kubectl get lvr # or localvolumereplica</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">NAME KIND CAPACITY NODE STATE SYNCED DEVICE AGE</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">pvc-996b05e8-80f2-4240-ace4-5f5f250310e2-v5scm9 LVM 1073741824 k8s-node1 Ready true /dev/LocalStorage_PoolHDD/pvc-996b05e8-80f2-4240-ace4-5f5f250310e2 80s</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p><code>LocalVolumeReplica</code> allows HwameiStor to support features like HA, migration, hot standby of volumes and fast recovery of Kubernetes applications, making it more competitive as a local storage tool.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="conclusion">Conclusion<a class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p><code>LocalVolume</code> and <code>LocalVolumeReplica</code> are common concepts in many storage products, but each product can have its own competitive and unique features based on these two concepts. A technical difficulty can be solved with different solutions, so these concepts are also suitable for different production scenarios.</p><p>We will provide more capabilities for more scenarios in future releases. Both users and developers are welcome to join us!</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/hello">hello</a></li><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/hwameistor">Hwameistor</a></li></ul></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="title_f1Hy" itemprop="headline"><a itemprop="url" href="/blog/2">Reliable Helper System for HwameiStor Is Online</a></h2><div class="container_mt6G margin-vert--md"><time datetime="2022-05-19T00:00:00.000Z" itemprop="datePublished">May 19, 2022</time> · <!-- -->2 min read</div><div class="margin-top--md margin-bottom--sm row"><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/angel0507" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://avatars.githubusercontent.com/u/39614083?v=4" alt="Jie Li"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/angel0507" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Jie Li</span></a></div><small class="avatar__subtitle" itemprop="description">Developer</small></div></div></div><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/windsonsea" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://github.com/windsonsea.png" alt="Michael Yao"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/windsonsea" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Michael Yao</span></a></div><small class="avatar__subtitle" itemprop="description">Technical Writer</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><blockquote><p>News today: The HwameiStor Reliable Helper System, an automatic and reliable cloud-native local storage maintenance system dedicated to system operation and maintenance, has been launched.</p></blockquote><p>DaoCloud officially opens source of HwameiStor Reliable Helper System, a cloud native, automatic, reliable local storage maintenance system. This system is still in the alpha stage. HwameiStor creates a local storage pool with HDD, SSD, and NVMe disks for a central management. As the underlying data base used by applications, disks often face risks such as natural and unintentional damage. In this case, the Reliable Helper System comes out for disk operation and maintenance. All developers and enthusiasts are welcome to try it out.</p><p><img loading="lazy" alt="System architecture" src="/assets/images/HwameiStor-replace-disk-arch-c66fff2c76854dc33971e990f2b1b061.jpg" width="792" height="731" class="img_ev3q"></p><p>In the cloud native era, application developers can focus on the business logic itself, while the agility, scalability, and reliability required by the application runtime attribute to the infrastructure platform and O\&M team. The HwameiStor Reliable Helper System is a reliable operation and maintenance system that meets the requirements of the cloud-native era. Currently, it supports the feature of one-click disk replacement.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="comprehensively-enhance-the-operation-and-maintenance">Comprehensively enhance the operation and maintenance<a class="hash-link" href="#comprehensively-enhance-the-operation-and-maintenance" title="Direct link to heading"></a></h2><h2 class="anchor anchorWithStickyNavbar_LWe7" id="reliable-one-click-replacement-alert-reminder">Reliable, one-click replacement, alert reminder<a class="hash-link" href="#reliable-one-click-replacement-alert-reminder" title="Direct link to heading"></a></h2><ul><li><p>Reliable data migration and backfill</p><p>Automatically recognize RAID disks and determine if the data migration and backfill is required to guarantee data reliability.</p></li><li><p>One-click disk replacement</p><p>This feature is implemented by using the disk uuid.</p></li><li><p>Intuitive alert reminder</p><p>If any exceptions occur in the process of one-click disk replacement, the system will raise an alert to remind you.</p></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="join-us">Join us<a class="hash-link" href="#join-us" title="Direct link to heading"></a></h2><p>If the coming future is an era of intelligent Internet, developers will be the pioneers to that milestone, and the open source community will become the "metaverse" of developers.</p><p>If you have any questions about the HwameiStor cloud-native local storage system, welcome to join the community to explore this metaverse world dedicated for developers and grow together.</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/hello">hello</a></li><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/hwameistor">Hwameistor</a></li></ul></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="title_f1Hy" itemprop="headline"><a itemprop="url" href="/blog/1">HwameiStor Comes Online</a></h2><div class="container_mt6G margin-vert--md"><time datetime="2022-04-25T00:00:00.000Z" itemprop="datePublished">April 25, 2022</time> · <!-- -->3 min read</div><div class="margin-top--md margin-bottom--sm row"><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/windsonsea" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://github.com/windsonsea.png" alt="Michael Yao"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/windsonsea" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Michael Yao</span></a></div><small class="avatar__subtitle" itemprop="description">Technical Writer</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>HwameiStor, an automated, highly available, cloud native, local storage system, is coming online</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/hello">hello</a></li><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/hwameistor">Hwameistor</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about HwameiStor Comes Online" href="/blog/1"><b>Read More</b></a></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="title_f1Hy" itemprop="headline"><a itemprop="url" href="/blog/welcome">Welcome</a></h2><div class="container_mt6G margin-vert--md"><time datetime="2022-04-22T00:00:00.000Z" itemprop="datePublished">April 22, 2022</time> · <!-- -->One min read</div><div class="margin-top--md margin-bottom--sm row"><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/windsonsea" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://github.com/windsonsea.png" alt="Michael Yao"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/windsonsea" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Michael Yao</span></a></div><small class="avatar__subtitle" itemprop="description">Technical Writer</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>Welcome to the Hwameistor blog space.</p><p>Here you can keep up with the progress of the Hwameistor open source project and recent hot topics.</p><p>We also plan to include release notes for major releases, guidance articles, community-related events, and possibly some development tips, and interesting topics within the team.</p><p>If you are interested in contributing to this open source project and would like to join the discussion or make some guest blog posts, please contact us.</p><p>GitHub address is: <a href="https://github.com/hwameistor" target="_blank" rel="noopener noreferrer">https://github.com/hwameistor</a></p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/hello">hello</a></li><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/hwameistor">Hwameistor</a></li></ul></div></footer></article><nav class="pagination-nav" aria-label="Blog list page navigation"></nav></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/docs/intro">Documentation</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/hwameistor/hwameistor" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 HwameiStor, All Rights Reserved.The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation,
please see our Trademark Usage page:https://www.linuxfoundation.org/legal/trademark-usage</div></div></div></footer></div>
<script src="/assets/js/runtime~main.22d15fd4.js"></script>
<script src="/assets/js/main.fcf31eec.js"></script>
</body>
</html>