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

perf: enhance the loading process of replicas particularly when a significant number of replicas are spread across multiple disks #2078

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
be578e2
perf: improve the loading of a great number of replicas from multiple…
empiredan Jul 17, 2024
44b80e8
perf: improve the loading of a great number of replicas from multiple…
empiredan Jul 18, 2024
b61ad76
fix compilation
empiredan Jul 19, 2024
251ae4f
fix tests
empiredan Jul 19, 2024
afb0233
format
empiredan Jul 19, 2024
3b5e6c1
fix IWYU
empiredan Jul 19, 2024
7015006
refactor
empiredan Jul 19, 2024
5db3f76
refactor
empiredan Jul 24, 2024
5e38585
add test for loading replicas
empiredan Jul 24, 2024
89d39b9
add tests
empiredan Jul 25, 2024
6b6b630
add tests
empiredan Jul 26, 2024
2fb4a53
fix tests
empiredan Jul 26, 2024
e9c6db6
add tests
empiredan Jul 29, 2024
05bfb8d
add comments
empiredan Jul 29, 2024
db6b056
refactor
empiredan Jul 30, 2024
fadcb34
refactor
empiredan Jul 30, 2024
2adc2d3
refactor
empiredan Jul 30, 2024
89ce78c
fix clang tidy
empiredan Aug 30, 2024
ef3d4de
fix clang tidy
empiredan Aug 30, 2024
e4e20e5
fix centos 7 compilation and IWYU
empiredan Sep 2, 2024
845f42e
fix IWYU
empiredan Sep 2, 2024
f52a98c
fix clang tidy
empiredan Sep 2, 2024
d5ac1fb
rename parameter
empiredan Sep 4, 2024
284af4f
add GetReplicaDirNameTest
empiredan Sep 20, 2024
39bb57d
add ParseReplicaDirNameTest, fix clang-tidy and IWYU
empiredan Sep 20, 2024
40483e7
fix ParseReplicaDirNameTest and fix IWYU
empiredan Sep 20, 2024
5ecadf9
fix clang tidy
empiredan Sep 20, 2024
c456dc2
fix load replicas
empiredan Sep 26, 2024
783112f
fix IWYU
empiredan Sep 27, 2024
018d3b4
fix upload-artifact
empiredan Sep 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
CheckOptions: []
# Disable some checks that are not useful for us now.
# They are sorted by names, and should be consistent to build_tools/clang_tidy.py.
Checks: 'abseil-*,boost-*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,cppcoreguidelines-*,darwin-*,fuchsia-*,google-*,hicpp-*,linuxkernel-*,llvm-*,misc-*,modernize-*,performance-*,portability-*,readability-*,-bugprone-easily-swappable-parameters,-bugprone-lambda-function-name,-bugprone-macro-parentheses,-cert-err58-cpp,-concurrency-mt-unsafe,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-union-access,-fuchsia-default-arguments-calls,-fuchsia-overloaded-operator,-fuchsia-statically-constructed-objects,-google-readability-avoid-underscore-in-googletest-name,-hicpp-avoid-c-arrays,-hicpp-named-parameter,-hicpp-no-array-decay,-llvm-include-order,-misc-definitions-in-headers,-misc-non-private-member-variables-in-classes,-modernize-avoid-c-arrays,-modernize-replace-disallow-copy-and-assign-macro,-modernize-use-trailing-return-type,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-magic-numbers,-readability-named-parameter'
Checks: 'abseil-*,boost-*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,cppcoreguidelines-*,darwin-*,fuchsia-*,google-*,hicpp-*,linuxkernel-*,llvm-*,misc-*,modernize-*,performance-*,portability-*,readability-*,-bugprone-easily-swappable-parameters,-bugprone-lambda-function-name,-bugprone-macro-parentheses,-cert-err58-cpp,-concurrency-mt-unsafe,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-union-access,-fuchsia-default-arguments-calls,-fuchsia-overloaded-operator,-fuchsia-statically-constructed-objects,-google-readability-avoid-underscore-in-googletest-name,-hicpp-avoid-c-arrays,-hicpp-named-parameter,-hicpp-no-array-decay,-llvm-include-order,-misc-definitions-in-headers,-misc-non-private-member-variables-in-classes,-modernize-avoid-bind,-modernize-avoid-c-arrays,-modernize-replace-disallow-copy-and-assign-macro,-modernize-use-trailing-return-type,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-magic-numbers,-readability-named-parameter,-readability-suspicious-call-argument'
ExtraArgs:
ExtraArgsBefore: []
FormatStyle: none
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload_artifact/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
tar -zcvhf ${ARTIFACT_NAME}_builder.tar build/latest/output build/latest/bin build/latest/src/server/test/config.ini hadoop-bin zookeeper-bin
shell: bash
- name: Upload tarball
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}_artifact_${{ github.sha }}
path: ${{ env.ARTIFACT_NAME }}_builder.tar
4 changes: 3 additions & 1 deletion build_tools/clang_tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,15 @@ def tidy_on_path(path):
"-llvm-include-order,"
"-misc-definitions-in-headers,"
"-misc-non-private-member-variables-in-classes,"
"-modernize-avoid-bind,"
"-modernize-avoid-c-arrays,"
"-modernize-replace-disallow-copy-and-assign-macro,"
"-modernize-use-trailing-return-type,"
"-readability-function-cognitive-complexity,"
"-readability-identifier-length,"
"-readability-magic-numbers,"
"-readability-named-parameter",
"-readability-named-parameter,"
"-readability-suspicious-call-argument",
"-extra-arg=-language=c++",
"-extra-arg=-std=c++17",
"-extra-arg=-Ithirdparty/output/include"]
Expand Down
2 changes: 1 addition & 1 deletion src/common/replication.codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ MAKE_EVENT_CODE(LPC_META_STATE_NORMAL, TASK_PRIORITY_COMMON)

// THREAD_POOL_REPLICATION
#define CURRENT_THREAD_POOL THREAD_POOL_REPLICATION
MAKE_EVENT_CODE(LPC_REPLICATION_INIT_LOAD, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE(RPC_REPLICATION_WRITE_EMPTY, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE(LPC_PER_REPLICA_CHECKPOINT_TIMER, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE(LPC_PER_REPLICA_COLLECT_INFO_TIMER, TASK_PRIORITY_COMMON)
Expand Down Expand Up @@ -185,6 +184,7 @@ MAKE_EVENT_CODE(LPC_REPLICATION_HIGH, TASK_PRIORITY_HIGH)

// THREAD_POOL_LOCAL_APP
#define CURRENT_THREAD_POOL THREAD_POOL_LOCAL_APP
MAKE_EVENT_CODE(LPC_REPLICATION_INIT_LOAD, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE(LPC_WRITE, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE(LPC_read_THROTTLING_DELAY, TASK_PRIORITY_COMMON)
#undef CURRENT_THREAD_POOL
Expand Down
1 change: 1 addition & 0 deletions src/replica/replica.h
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ class replica : public serverlet<replica>, public ref_counter, public replica_ba
friend class replica_disk_test;
friend class replica_disk_migrate_test;
friend class open_replica_test;
friend class mock_load_replica;
friend class replica_follower;
friend class ::pegasus::server::pegasus_server_test_base;
friend class ::pegasus::server::rocksdb_wrapper_test;
Expand Down
Loading
Loading