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

Merged
merged 43 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fe8f808
perf: improve the loading of a great number of replicas from multiple…
empiredan Jul 17, 2024
5d5b74c
perf: improve the loading of a great number of replicas from multiple…
empiredan Jul 18, 2024
a13dac4
fix compilation
empiredan Jul 19, 2024
ec3f247
fix tests
empiredan Jul 19, 2024
ea00a10
format
empiredan Jul 19, 2024
6bbeefb
fix IWYU
empiredan Jul 19, 2024
c43db34
refactor
empiredan Jul 19, 2024
1f64a4f
refactor
empiredan Jul 24, 2024
e2379b4
add test for loading replicas
empiredan Jul 24, 2024
37a21cd
add tests
empiredan Jul 25, 2024
293971b
add tests
empiredan Jul 26, 2024
4efcd56
fix tests
empiredan Jul 26, 2024
461ac0c
add tests
empiredan Jul 29, 2024
dd87502
add comments
empiredan Jul 29, 2024
544c580
refactor
empiredan Jul 30, 2024
9a0e79f
refactor
empiredan Jul 30, 2024
93dbf5a
refactor
empiredan Jul 30, 2024
d5a9044
fix clang tidy
empiredan Aug 30, 2024
ff70d9f
fix clang tidy
empiredan Aug 30, 2024
f7ed2c9
fix centos 7 compilation and IWYU
empiredan Sep 2, 2024
8f10ee9
fix IWYU
empiredan Sep 2, 2024
7c90441
fix clang tidy
empiredan Sep 2, 2024
d63ace3
rename parameter
empiredan Sep 4, 2024
be38fb4
add GetReplicaDirNameTest
empiredan Sep 20, 2024
1400fc9
add ParseReplicaDirNameTest, fix clang-tidy and IWYU
empiredan Sep 20, 2024
f06eef7
fix ParseReplicaDirNameTest and fix IWYU
empiredan Sep 20, 2024
1116e0f
fix clang tidy
empiredan Sep 20, 2024
1885144
fix load replicas
empiredan Sep 26, 2024
1d8a460
fix upload-artifact
empiredan Sep 27, 2024
ae9445a
rollback upload-artifact
empiredan Dec 16, 2024
ae08126
fix load replicas and tests
empiredan Dec 16, 2024
871b004
refactor
empiredan Dec 17, 2024
6329ecb
refactor
empiredan Dec 18, 2024
be70e2e
rename replicas type
empiredan Dec 18, 2024
510dc78
fix clang-tidy and add command to update configurations for loading r…
empiredan Dec 18, 2024
2fd42b9
fix clang-tidy
empiredan Dec 19, 2024
caeafdc
fix clang-tidy, add timer and comments
empiredan Dec 19, 2024
61912bb
fix clang-tidy
empiredan Dec 19, 2024
f0835d6
fix IWYU
empiredan Dec 19, 2024
b140d54
refactor and add comments
empiredan Dec 20, 2024
dd324c9
add comments
empiredan Dec 20, 2024
227a2c4
refactor
empiredan Dec 24, 2024
a4ac805
fix clang-tidy
empiredan Dec 24, 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,-misc-unused-parameters,-modernize-avoid-c-arrays,-modernize-replace-disallow-copy-and-assign-macro,-modernize-use-trailing-return-type,-performance-unnecessary-value-param,-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,-misc-unused-parameters,-modernize-avoid-bind,-modernize-avoid-c-arrays,-modernize-replace-disallow-copy-and-assign-macro,-modernize-use-trailing-return-type,-performance-unnecessary-value-param,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-magic-numbers,-readability-named-parameter,-readability-suspicious-call-argument'
ExtraArgs:
ExtraArgsBefore: []
FormatStyle: none
Expand Down
4 changes: 3 additions & 1 deletion build_tools/clang_tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@ def tidy_on_path(path):
"-misc-definitions-in-headers,"
"-misc-non-private-member-variables-in-classes,"
"-misc-unused-parameters,"
"-modernize-avoid-bind,"
"-modernize-avoid-c-arrays,"
"-modernize-replace-disallow-copy-and-assign-macro,"
"-modernize-use-trailing-return-type,"
"-performance-unnecessary-value-param,"
"-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 @@ -141,7 +141,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 @@ -186,6 +185,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/meta/meta_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <boost/lexical_cast.hpp>
#include <algorithm> // for std::remove_if
#include <chrono>
#include <cstdint>
#include <functional>
#include <ostream>
#include <string_view>
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