Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into fix_split_register_ut
Browse files Browse the repository at this point in the history
  • Loading branch information
hycdong authored Oct 27, 2020
2 parents af35dfe + 1812022 commit b3202f3
Show file tree
Hide file tree
Showing 66 changed files with 74 additions and 306 deletions.
6 changes: 5 additions & 1 deletion include/dsn/dist/replication/replication.codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ 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 DEFINE_STORAGE_WRITE_RPC_CODE(x, allow_batch, is_idempotent) \
DEFINE_STORAGE_RPC_CODE( \
Expand Down Expand Up @@ -182,13 +183,16 @@ MAKE_EVENT_CODE(LPC_BACKGROUND_BULK_LOAD, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE(LPC_REPLICATION_LONG_LOW, TASK_PRIORITY_LOW)
MAKE_EVENT_CODE(LPC_REPLICATION_LONG_COMMON, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE(LPC_REPLICATION_LONG_HIGH, TASK_PRIORITY_HIGH)
MAKE_EVENT_CODE_AIO(LPC_WRITE_REPLICATION_LOG_PRIVATE, TASK_PRIORITY_COMMON)
#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_COMMON)
#undef CURRENT_THREAD_POOL

// bulk load ingestion request
namespace dsn {
namespace apps {
Expand Down
8 changes: 2 additions & 6 deletions src/failure_detector/test/config-test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,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_FDS_SERVICE,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_FDS_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG

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

[apps.test_worker]
type = worker
Expand Down Expand Up @@ -99,10 +99,6 @@ worker_count = 8
[threadpool.THREAD_POOL_DLOCK]
partitioned = true

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[zookeeper]
hosts_list = localhost:12181
timeout_ms = 30000
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 @@ -12,15 +12,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_FDS_SERVICE,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_FDS_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.server]
type = test
arguments =
ports = 20101
run = false
count = 0
pools = THREAD_POOL_DEFAULT, THREAD_POOL_REPLICATION,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_REPLICATION,THREAD_POOL_SLOG,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 @@ -12,15 +12,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_FDS_SERVICE,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT, THREAD_POOL_DLOCK, THREAD_POOL_REPLICATION, THREAD_POOL_REPLICATION_LONG, THREAD_POOL_FDS_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG

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

[apps.test_worker]
type = worker
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 @@ -3,7 +3,7 @@ run = true

[apps.replica]
type = replica
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_SLOG,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 @@ -10,7 +10,7 @@ type = replica
run = true
count = 1
ports = 54321
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_LOCAL_SERVICE,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_LOCAL_SERVICE,THREAD_POOL_SLOG,THREAD_POOL_PLOG

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

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

[core]
tool = nativerun
Expand All @@ -19,10 +19,6 @@ worker_count = 2
name = default
partitioned = false

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
name = replica
partitioned = true
Expand Down
2 changes: 1 addition & 1 deletion src/replica/mutation_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ void mutation_log_private::commit_pending_mutations(log_file_ptr &lf,
_plock.unlock();
}
},
0);
get_gpid().thread_hash());
}

///////////////////////////////////////////////////////////////
Expand Down
6 changes: 1 addition & 5 deletions src/replica/split/test/config-test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type = replica
run = true
count = 1
ports = 54321
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[core]
;tool = simulator
Expand Down Expand Up @@ -49,10 +49,6 @@ partitioned = false
worker_priority = THREAD_xPRIORITY_NORMAL
worker_count = 2

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
name = replica
partitioned = true
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.client]
type = client
Expand Down Expand Up @@ -63,10 +63,6 @@ name = default
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
name = replication
partitioned = true
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-000.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -70,10 +70,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-001.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -70,10 +70,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-002.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -70,10 +70,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-003.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -70,10 +70,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-004.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -70,10 +70,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-005.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -70,10 +70,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-006.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -71,10 +71,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-100.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -71,10 +71,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-101.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -71,10 +71,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-102.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -71,10 +71,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
6 changes: 1 addition & 5 deletions src/replica/storage/simple_kv/test/case-103.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arguments =
ports = 34801
run = true
count = 3
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG
pools = THREAD_POOL_DEFAULT,THREAD_POOL_REPLICATION_LONG,THREAD_POOL_REPLICATION,THREAD_POOL_FD,THREAD_POOL_LOCAL_APP,THREAD_POOL_SLOG,THREAD_POOL_PLOG

[apps.c]
type = client
Expand Down Expand Up @@ -71,10 +71,6 @@ worker_priority = THREAD_xPRIORITY_LOWEST
partitioned = false
worker_priority = THREAD_xPRIORITY_LOWEST

[threadpool.THREAD_POOL_SLOG]
name = slog
worker_count = 1

[threadpool.THREAD_POOL_REPLICATION]
partitioned = true
worker_priority = THREAD_xPRIORITY_LOWEST
Expand Down
Loading

0 comments on commit b3202f3

Please sign in to comment.