summaryrefslogtreecommitdiffstats
path: root/streaming/replication.c
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-01-18 21:32:50 +0200
committerGitHub <noreply@github.com>2023-01-18 21:32:50 +0200
commitc1908d3163185cf65a139edeb11a165a10eca1e9 (patch)
tree6fe69ef8cd5f5797253e0d583fe60d56c69ec3da /streaming/replication.c
parent51565d55e92b6f814a09ca87d3c77a40acba576c (diff)
DBENGINE v2 - improvements part 5 (#14289)
* cleanup journal v2 mounts periodically * fix for last commit * re-enable loading page from disk when the arrangement of pages requires it * Remove unused statistics * Estimate diskspace when the current datafile is full and queue a rotate command (Currently it will not attempt to estimate end size for journals) Queue a command to check quota on startup per tier * apps.plugin now exposes RSS chart * shorter thread names to make debugging easier, since thread names can only be 15 characters * more thread names fixes * allow an apps_groups.conf target to be pid 0 or 1 Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
Diffstat (limited to 'streaming/replication.c')
-rw-r--r--streaming/replication.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/streaming/replication.c b/streaming/replication.c
index 96859723a9..c639016349 100644
--- a/streaming/replication.c
+++ b/streaming/replication.c
@@ -1553,13 +1553,15 @@ void *replication_thread_main(void *ptr __maybe_unused) {
threads = 1;
}
- if(--threads) {
+ if(threads > 1) {
replication_globals.main_thread.threads = threads;
replication_globals.main_thread.threads_ptrs = mallocz(threads * sizeof(netdata_thread_t *));
- for(int i = 0; i < threads ;i++) {
+ for(int i = 1; i < threads ;i++) {
+ char tag[NETDATA_THREAD_TAG_MAX + 1];
+ snprintfz(tag, NETDATA_THREAD_TAG_MAX, "REPLAY[%d]", i + 1);
replication_globals.main_thread.threads_ptrs[i] = mallocz(sizeof(netdata_thread_t));
- netdata_thread_create(replication_globals.main_thread.threads_ptrs[i], "REPLICATION",
+ netdata_thread_create(replication_globals.main_thread.threads_ptrs[i], tag,
NETDATA_THREAD_OPTION_JOINABLE, replication_worker_thread, NULL);
}
}