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

feat(slog): Remove slog related code #1759

Merged
merged 8 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 1 addition & 5 deletions docker/pegasus-docker-compose/config.min.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
type = replica
name = replica
ports = 34801
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_COMPACT,THREAD_POOL_INGESTION,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_COMPACT,THREAD_POOL_INGESTION,THREAD_POOL_PLOG

[apps.collector]
name = collector
Expand Down Expand Up @@ -105,10 +105,6 @@
partitioned = false
worker_count = 2

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_PLOG]
name = plog
partitioned = true
Expand Down
5 changes: 0 additions & 5 deletions src/common/replication.codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ DEFINE_THREAD_POOL_CODE(THREAD_POOL_LOCAL_APP)
DEFINE_THREAD_POOL_CODE(THREAD_POOL_REPLICATION_LONG)
DEFINE_THREAD_POOL_CODE(THREAD_POOL_COMPACT)
DEFINE_THREAD_POOL_CODE(THREAD_POOL_INGESTION)
DEFINE_THREAD_POOL_CODE(THREAD_POOL_SLOG)
DEFINE_THREAD_POOL_CODE(THREAD_POOL_PLOG)
DEFINE_THREAD_POOL_CODE(THREAD_POOL_SCAN)

Expand Down Expand Up @@ -207,10 +206,6 @@ MAKE_EVENT_CODE(LPC_REPLICATION_LONG_COMMON, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE(LPC_REPLICATION_LONG_HIGH, TASK_PRIORITY_HIGH)
#undef CURRENT_THREAD_POOL

#define CURRENT_THREAD_POOL THREAD_POOL_SLOG
MAKE_EVENT_CODE_AIO(LPC_WRITE_REPLICATION_LOG_SHARED, TASK_PRIORITY_HIGH)
#undef CURRENT_THREAD_POOL

#define CURRENT_THREAD_POOL THREAD_POOL_PLOG
MAKE_EVENT_CODE_AIO(LPC_WRITE_REPLICATION_LOG_PRIVATE, TASK_PRIORITY_HIGH)
#undef CURRENT_THREAD_POOL
Expand Down
16 changes: 9 additions & 7 deletions src/common/replication_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "common/replication_common.h"

#include <string.h>
// IWYU pragma: no_include <ext/alloc_traits.h>
#include <algorithm>
#include <fstream>
Expand Down Expand Up @@ -63,7 +64,7 @@ DSN_DEFINE_int32(
replication,
gc_interval_ms,
30 * 1000,
"every what period (ms) we do garbage collection for dead replicas, on-disk state, log, etc.");
"every what period (ms) we do replica stat. The name contains 'gc' is for legacy reason.");
DSN_DEFINE_int32(replication,
fd_check_interval_seconds,
2,
Expand Down Expand Up @@ -99,7 +100,12 @@ DSN_DEFINE_bool(replication,
"whether to disable empty write, default is false");
DSN_TAG_VARIABLE(empty_write_disabled, FT_MUTABLE);

DSN_DEFINE_string(replication, slog_dir, "", "The shared log directory");
DSN_DEFINE_string(replication,
slog_dir,
"",
"The shared log directory. Deprecated since Pegasus "
"2.6.0, but leave it and do not modify the value if "
"upgrading from older versions.");
DSN_DEFINE_string(replication, data_dirs, "", "replica directory list");
DSN_DEFINE_string(replication,
data_dirs_black_list_file,
Expand All @@ -118,11 +124,7 @@ void replication_options::initialize()
app_name = info.full_name;
app_dir = info.data_dir;

// slog_dir:
// - if config[slog_dir] is empty: "app_dir/slog"
// - else: "config[slog_dir]/app_name/slog"
slog_dir = FLAGS_slog_dir;
if (slog_dir.empty()) {
if (strlen(FLAGS_slog_dir) == 0) {
slog_dir = app_dir;
} else {
slog_dir = utils::filesystem::path_combine(slog_dir, app_name);
Expand Down
4 changes: 2 additions & 2 deletions src/failure_detector/test/config-test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ run = true
ports =
count = 1
delay_seconds = 1
pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_PLOG

[apps.server]
type = test
arguments =
ports = 20101
run = false
count = 0
pools = THREAD_POOL_DEFAULT, THREAD_POOL_REPLICATION,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_REPLICATION,THREAD_POOL_PLOG

[apps.test_worker]
type = worker
Expand Down
4 changes: 2 additions & 2 deletions src/failure_detector/test/config-whitelist-test-failed.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ run = true
ports =
count = 1
delay_seconds = 1
pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_PLOG

[apps.server]
type = test
arguments =
ports = 20101
run = false
count = 0
pools = THREAD_POOL_DEFAULT, THREAD_POOL_REPLICATION,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_REPLICATION,THREAD_POOL_PLOG

[apps.test_worker]
type = worker
Expand Down
4 changes: 2 additions & 2 deletions src/failure_detector/test/config-whitelist-test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ run = true
ports =
count = 1
delay_seconds = 1
pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_PLOG

[apps.server]
type = test
arguments =
ports = 20101
run = false
count = 0
pools = THREAD_POOL_DEFAULT, THREAD_POOL_REPLICATION,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_REPLICATION,THREAD_POOL_PLOG

[apps.test_worker]
type = worker
Expand Down
1 change: 0 additions & 1 deletion src/perf_counter/perf_counters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ std::map<std::string, std::string> s_brief_stat_map = {
{"replica*app.pegasus*manual.compact.running.count", "manual_compact_running_count"},
{"replica*app.pegasus*manual.compact.enqueue.count", "manual_compact_enqueue_count"},
{"replica*app.pegasus*rdb.block_cache.memory_usage", "rdb_block_cache_memory_usage"},
{"replica*eon.replica_stub*shared.log.size(MB)", "shared_log_size(MB)"},
{"replica*server*memused.virt(MB)", "memused_virt(MB)"},
{"replica*server*memused.res(MB)", "memused_res(MB)"},
{"replica*eon.replica_stub*disk.capacity.total(MB)", "disk_capacity_total(MB)"},
Expand Down
2 changes: 1 addition & 1 deletion src/replica/backup/test/config-test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ run = true

[apps.replica]
type = replica
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_PLOG

[core]
tool = nativerun
Expand Down
2 changes: 1 addition & 1 deletion src/replica/bulk_load/test/config-test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type = replica
run = true
count = 1
ports = 54321
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_BLOCK_SERVICE,THREAD_POOL_PLOG

[core]
;tool = simulator
Expand Down
2 changes: 1 addition & 1 deletion src/replica/duplication/test/config-test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ run = true

[apps.replica]
type = replica
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_SLOG,THREAD_POOL_PLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_PLOG

[core]
tool = nativerun
Expand Down
Loading
Loading