Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

follow apache Pegasus #1

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7a1c461
feat(build): Support to specify THIRDPARTY_ROOT by setting the enviro…
acelyc111 May 30, 2024
53dd218
feat(shell): add JSON format data output to some backup_policy comman…
Samunroyu May 30, 2024
dbe66a2
chore(pack): support to pack server binaries separately (#2034)
Samunroyu May 31, 2024
6c96b5a
fix(duplication): add warning message while trying to add a duplicati…
empiredan Jun 4, 2024
8fd8902
fix(shell): Add PARSE_OPT_STRS marco for shell command execute flag …
Samunroyu Jun 5, 2024
44e8350
chore(go-client): add generation thrift files of go-client (#1917)
lengyuexuexuan Jun 20, 2024
2ab5be6
fix(go-client): update config once replica server failed and forward …
lengyuexuexuan Jun 20, 2024
1fbfd47
fix(FQDN): Fix the bug of crash caused by un-resolved IP address (#2044)
acelyc111 Jun 21, 2024
6a30e9b
chore: fix dead link http://open-falcon.org/ (#2046)
empiredan Jun 21, 2024
7e95f31
feat(remote_command): provide the query for the progress of decrees i…
empiredan Jun 21, 2024
a774afe
fix(duplication): reduce the delay before last mutation is duplicated…
empiredan Jun 27, 2024
596603c
feat(java-client): use thrift-maven-plugin to generate thrift sources…
shalk Jun 27, 2024
8877aba
chore(run.sh): link pegasus_shell only doesnt exist (#2053)
Samunroyu Jul 1, 2024
48f69d1
fix: Fix a typo in log when [network].enable_udp is disabled (#2055)
acelyc111 Jul 3, 2024
877c6bd
fix(scripts): downgrade_node does not work with set -e (#2056)
Samunroyu Jul 4, 2024
efe950d
feat(backup): Add --force option for 'disable_backup_policy' shell co…
acelyc111 Jul 4, 2024
7f50394
fix(backup): Fix the stack overflow when read large sst file (#2059)
acelyc111 Jul 4, 2024
57dd0e1
feat(remote_command): change some remote_command shell output to JSO…
Samunroyu Jul 4, 2024
3f78d22
fix(rocksdb): fix the problem that the usage of block cache is not se…
empiredan Jul 5, 2024
d5621be
fix(duplication): create checkpoint for the replica with 0 or 1 recor…
empiredan Jul 11, 2024
60606a4
refactor(format): bump clang-format to 14 (#2063)
acelyc111 Jul 11, 2024
42bd5bb
chore(CI): Add envs in build_debug_on_centos7 to ensure job can be ra…
acelyc111 Jul 11, 2024
5cfba55
feat(FQDN): Add host_port structures for clients and bump actions/che…
acelyc111 Jul 12, 2024
a4279ec
chore(CI): Force CI to run on node16 (#2070)
acelyc111 Jul 12, 2024
115f75d
chore(CI): Force to use actions/checkout@v3 when OS maybe CentOS 7 or…
acelyc111 Jul 15, 2024
102e087
fix(CI): fix java regular workflow (#2074)
shalk Jul 15, 2024
abd1794
refactor(FQDN): update some logs in cpp-shell CLI (#2064)
acelyc111 Jul 15, 2024
a128565
fix(Dockerfile): Fix the yum install failure caused by its EOL (#2075)
acelyc111 Jul 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
110 changes: 91 additions & 19 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,82 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Reference: https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignArrayOfStructures: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: None
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: false
AfterControlStatement: Never
AfterEnum: true
AfterExternBlock: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
IndentBraces: false
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyNamespace: true
SplitEmptyRecord: true
BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: true
FixNamespaceComments: true
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IfMacros: [ KJ_IF_MAYBE ]
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
Expand All @@ -72,40 +98,86 @@ IncludeCategories:
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '$'
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
Language: Cpp
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PPIndentWidth: -1
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 4
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 4
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: true
SortIncludes: false
RemoveBracesLLVM: false
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: Never
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterIfMacros: true
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Maximum: -1
Minimum: 1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
Standard: c++17
StatementAttributeLikeMacros: [ Q_EMIT]
StatementMacros: [ Q_UNUSED, QT_REQUIRE_VERSION]
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros: [ STRINGIZE, PP_STRINGIZE, BOOST_PP_STRINGIZE, NS_SWIFT_NAME, CF_SWIFT_NAME]
...

4 changes: 2 additions & 2 deletions .github/actions/build_pegasus/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ runs:
shell: bash
- name: Pack Server
run: |
./run.sh pack_server -j
./run.sh pack_server -j ${PACK_OPTIONS}
rm -rf pegasus-server-*
shell: bash
- name: Pack Tools
run: |
./run.sh pack_tools -j
./run.sh pack_tools -j ${PACK_OPTIONS}
rm -rf pegasus-tools-*
shell: bash
- name: Clear Build Files
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build-push-env-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ on:
jobs:
build_compilation_env_docker_images:
runs-on: ubuntu-latest
env:
# The glibc version on ubuntu1804 and centos7 is lower than the node20 required, so
# we need to force the node version to 16.
# See more details: https://github.com/actions/checkout/issues/1809
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
fail-fast: false
matrix:
Expand All @@ -44,6 +50,8 @@ jobs:
- centos7
steps:
- name: Checkout
# The glibc version on ubuntu1804 and centos7 is lower than the actions/checkout@v4 required, so
# we need to force to use actions/checkout@v3.
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
name: Module Labeler
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Assign GitHub labels
uses: actions/labeler@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint_and_test_admin-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v2
with:
Expand All @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v2
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint_and_test_collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v2
with:
Expand All @@ -60,7 +60,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Go
Expand All @@ -80,7 +80,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Go
Expand Down
33 changes: 17 additions & 16 deletions .github/workflows/lint_and_test_cpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ env:
jobs:
cpp_clang_format_linter:
name: Lint
runs-on: ubuntu-latest
container:
image: apache/pegasus:clang-format-3.9
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: clang-format
run: ./scripts/run-clang-format.py --clang-format-executable clang-format-3.9 -e ./src/shell/linenoise -e ./src/shell/sds -e ./thirdparty -r .
run: ./scripts/run-clang-format.py --clang-format-executable clang-format-14 -e ./src/shell/linenoise -e ./src/shell/sds -e ./thirdparty -r .

iwyu:
name: IWYU
Expand All @@ -68,7 +66,7 @@ jobs:
container:
image: apache/pegasus:thirdparties-bin-ubuntu2204-${{ github.base_ref }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
run: |
.github/workflows/free_disk_space.sh
Expand Down Expand Up @@ -99,7 +97,7 @@ jobs:
image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }}
steps:
- name: Clone code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Rebuild thirdparty if needed
uses: "./.github/actions/rebuild_thirdparty_if_needed"
- name: Build Pegasus
Expand Down Expand Up @@ -164,7 +162,7 @@ jobs:
image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }}
options: --cap-add=SYS_PTRACE
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download artifact
uses: "./.github/actions/download_artifact"
- name: Run server tests
Expand All @@ -181,7 +179,7 @@ jobs:
container:
image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Rebuild thirdparty if needed
uses: "./.github/actions/rebuild_thirdparty_if_needed"
- name: Build Pegasus
Expand Down Expand Up @@ -248,7 +246,7 @@ jobs:
image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }}
options: --cap-add=SYS_PTRACE
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download artifact
uses: "./.github/actions/download_artifact"
- name: Run server tests
Expand All @@ -268,7 +266,7 @@ jobs:
# container:
# image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }}
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - name: Rebuild thirdparty if needed
# uses: "./.github/actions/rebuild_thirdparty_if_needed"
# - name: Build Pegasus
Expand Down Expand Up @@ -331,7 +329,7 @@ jobs:
# image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }}
# options: --cap-add=SYS_PTRACE
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - name: Download artifact
# uses: "./.github/actions/download_artifact"
# - name: Run server tests
Expand All @@ -348,7 +346,7 @@ jobs:
container:
image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Rebuild thirdparty if needed
uses: "./.github/actions/rebuild_thirdparty_if_needed"
# TODO(yingchun): Append "-m dsn_utils_tests" to the command if not needed to pack server or tools, for example, the dependencies are static linked.
Expand All @@ -372,7 +370,7 @@ jobs:
image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref }}
options: --cap-add=SYS_PTRACE
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download artifact
uses: "./.github/actions/download_artifact"
- name: Run server tests
Expand All @@ -388,7 +386,7 @@ jobs:
# Preinstalled softwares: https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
brew install ccache
brew install [email protected]
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -418,7 +416,10 @@ jobs:
runs-on: ubuntu-latest
env:
USE_JEMALLOC: OFF
BUILD_OPTIONS: -t debug --test
BUILD_OPTIONS: -t debug --test --separate_servers
PACK_OPTIONS: --separate_servers
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
container:
image: apache/pegasus:thirdparties-bin-centos7-${{ github.base_ref }}
steps:
Expand Down
Loading
Loading