This commit is contained in:
emmajiang
2020-07-02 11:06:21 +08:00
7 changed files with 110 additions and 22 deletions

85
.clang-format Normal file
View File

@ -0,0 +1,85 @@
---
Language: Cpp
# BasedOnStyle: LLVM
SortIncludes: false
AccessModifierOffset: -4
DerivePointerAlignment: false
PointerAlignment: Left
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: true
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 200
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
PointerBindsToType: true
Cpp11BracedListStyle: true
Standard: Auto
IndentWidth: 4
TabWidth: 4
UseTab: Never
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
IndentFunctionDeclarationAfterType: true
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
SpacesBeforeTrailingComments: 2
ContinuationIndentWidth: 4
CommentPragmas: '^lint'
MacroBlockBegin: "</span>
^ *PROG *$|</span>
CATCH_ALL_ERROR.*$"
MacroBlockEnd: "</span>
^ *END_PROG *$|</span>
END_CATCH_ERROR$"
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
...

View File

@ -5,7 +5,7 @@
- [Creating a Configuration File](#creating-a-configuration-file) - [Creating a Configuration File](#creating-a-configuration-file)
- [Initializing the Installation Environment](#initializing-the-installation-environment) - [Initializing the Installation Environment](#initializing-the-installation-environment)
- [Executing Installation](#executing-installation) - [Executing Installation](#executing-installation)
[Uninstalling the opeinGauss](#uninstalling-the-openGauss) - [Uninstalling the openGauss](#uninstalling-the-openGauss)
- [Compilation](#compilation) - [Compilation](#compilation)
- [Overview](#overview) - [Overview](#overview)
- [OS and Software Dependency Requirements](#os-and-software-dependency-requirements) - [OS and Software Dependency Requirements](#os-and-software-dependency-requirements)
@ -47,7 +47,7 @@ Bind NIC interrupts to different cores and bind cores to different background th
**ARM Optimization** **ARM Optimization**
Optimize atomic operations based on ARM platform LSE instructions, impletmenting efficient operation of critical sections. Optimize atomic operations based on ARM platform LSE instructions, implementing efficient operation of critical sections.
**SQL Bypass** **SQL Bypass**
@ -59,7 +59,7 @@ Under normal service loads, the RTO is less than 10 seconds, reducing the servic
**Parallel Recovery** **Parallel Recovery**
When the Xlog is transferred to the standby node, the standby node flushs the Xlog to storage medium. At the mean time, the Xlog is sent to the redo recovery dispatch thread. The dispatch thread sends the Xlog to multiple parallel recovery threads to replay. Ensure that the redo speed of the standby node keeps up with the generation speed of the primary host. The standby node is ready in real time, which can be promoted to primary instantly. When the Xlog is transferred to the standby node, the standby node flushs the Xlog to storage medium. At the meantime, the Xlog is sent to the redo recovery dispatch thread. The dispatch thread sends the Xlog to multiple parallel recovery threads to replay. Ensure that the redo speed of the standby node keeps up with the generation speed of the primary host. The standby node is ready in real time, which can be promoted to primary instantly.
**Security** **Security**
@ -208,7 +208,7 @@ After the openGauss configuration file is created, you need to run the gs_preins
Execute gs_preinstall in interactive mode. During the execution, the mutual trust between users root and between clusteropenGauss users is automatically established. Execute gs_preinstall in interactive mode. During the execution, the mutual trust between users root and between clusteropenGauss users is automatically established.
``` ```
./gs_preinstall -U omm -G dbgrp -X /opt/software/ openGauss/clusterconfig.xml ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/clusterconfig.xml
``` ```
omm is the database administrator (also the OS user running the openGauss), dbgrp is the group name of the OS user running the openGauss, and /opt/software/ openGauss/clusterconfig.xml is the path of the openGauss configuration file. During the execution, you need to determine whether to establish mutual trust as prompted and enter the password of user root or the openGauss user. omm is the database administrator (also the OS user running the openGauss), dbgrp is the group name of the OS user running the openGauss, and /opt/software/ openGauss/clusterconfig.xml is the path of the openGauss configuration file. During the execution, you need to determine whether to establish mutual trust as prompted and enter the password of user root or the openGauss user.
@ -241,7 +241,7 @@ After the openGauss installation environment is prepared by executing the pre-in
3. Use gs_install to install the openGauss. If the openGauss is installed in environment variable separation mode, run the source command to obtain the environment variable separation file ENVFILE. 3. Use gs_install to install the openGauss. If the openGauss is installed in environment variable separation mode, run the source command to obtain the environment variable separation file ENVFILE.
``` ```
gs_install -X /opt/software/ openGauss/clusterconfig.xml gs_install -X /opt/software/openGauss/clusterconfig.xml
``` ```
The password must meet the following complexity requirements: The password must meet the following complexity requirements:
@ -404,13 +404,13 @@ build.sh in openGauss-server is an important script tool during compilation. It
The following table describes the parameters. The following table describes the parameters.
| Option | Default Value | Parameter | Description | | Option | Default Value | Parameter | Description |
| :----- | :--------------------------- | :----------------------------- | :--------------------------------------- | | :----- | :--------------------------- | :----------------------------- | :----------------------------------------------------------- |
| -h | Do not use this option. | - | Help menu. | | -h | Do not use this option. | - | Help menu. |
| -m | release | [debug \| release \| memcheck] | Selects the target version. | | -m | release | [debug \| release \| memcheck] | Selects the target version. |
| -3rd | ${Code directory}/binarylibs | [binarylibs path] | Specifies the path of binarylibs. The path must be an absolute path. | | -3rd | ${Code directory}/binarylibs | [binarylibs path] | Specifies the path of binarylibs. The path must be an absolute path. |
| -pkg | Do not use this option. | - | Compresses the code compilation result into an installation package. | | -pkg | Do not use this option. | - | Compresses the code compilation result into an installation package. |
| -nopt | Do not use this option. | - | On kunpeng platform, like 1616 version, without LSE optimized. | | -nopt | Do not use this option. | - | On kunpeng platform, like 1616 version, without LSE optimized. |
> **NOTICE:** > **NOTICE:**
> >
@ -533,7 +533,7 @@ Compilation log: **make_compile.log**
Please read the chapter **Compiling by build.sh** first to understand the usage of build.sh and how to compile openGauss by using the script. Please read the chapter **Compiling by build.sh** first to understand the usage of build.sh and how to compile openGauss by using the script.
Now you can compile the installation package with just adding a option `-pkg`. Now you can compile the installation package with just adding an option `-pkg`.
``` ```
[user@linux openGauss-server]$ sh build.sh -m [debug | release | memcheck] -3rd [binarylibs path] -pkg [user@linux openGauss-server]$ sh build.sh -m [debug | release | memcheck] -3rd [binarylibs path] -pkg

View File

@ -11,7 +11,8 @@
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details. *--------------------------------------------------------------------------------------- * See the Mulan PSL v2 for more details.
* ---------------------------------------------------------------------------------------
* *
* cluster_guc.cpp * cluster_guc.cpp
* Interfaces for analysis manager of PDK tool. * Interfaces for analysis manager of PDK tool.

View File

@ -27,11 +27,13 @@ pip install -r requirements.txt
## Dependencies ## Dependencies
python3.5+ python3.5+
tensorflow==1.15.2 tensorflow>=2.2.0
keras-rl keras-rl2
keras keras>=2.4.0
paramiko paramiko
**Suggest:** Firstly, please upgrade your pip. ```python -m pip install --upgrade pip```
## Start tuning ## Start tuning
1. Start your database instance first; 1. Start your database instance first;
2. Choose a benchmark(TPC-C, TPC-H, etc.) and store data in your database; 2. Choose a benchmark(TPC-C, TPC-H, etc.) and store data in your database;

View File

@ -1,4 +1,4 @@
tensorflow==1.15.2 tensorflow>=2.2.0
keras-rl keras-rl2
keras<=2.2.5 keras>=2.4.0
paramiko paramiko

View File

@ -299,7 +299,7 @@ static Oid GetOperatorByTypeId(Oid typeID, Oid accessMethodId, int16 strategyNum
/* /*
* Parse the fileNames string from the split List. * Parse the fileNames string from the split List.
* @_in_out param splitList: point to the original split List, which may contain multiple files. * @_in_out param splitList: point to the original split List, which may contain multiple files.
* @_in param currentFileName: point to the first file or the only file like '/user/file1.orc' (new buffer). * @_in param currentFileName: point to the first file.
* @return Return the split parsed from the list. * @return Return the split parsed from the list.
*/ */
SplitInfo *ParseFileSplitList(List **splitList, char **currentFileName) SplitInfo *ParseFileSplitList(List **splitList, char **currentFileName)

View File

@ -1024,7 +1024,7 @@ DfsPrivateItem *MakeDfsPrivateItem(List *columnList, List *targetList, List *res
/* /*
* Parse the fileNames string from the split List. * Parse the fileNames string from the split List.
* @_in_out param splitList: point to the original split List, which may contain multiple files. * @_in_out param splitList: point to the original split List, which may contain multiple files.
* @_in param currentFileName: point to the first file or the only file '/user/demai/file1.orc' (new buffer). * @_in param currentFileName: point to the first file.
* @return Return the split parsed from the list. * @return Return the split parsed from the list.
*/ */
SplitInfo *ParseFileSplitList(List **splitList, char **currentFileName); SplitInfo *ParseFileSplitList(List **splitList, char **currentFileName);