diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2023-01-20 23:56:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 23:56:33 +0200 |
commit | dc9f81ccfe611410f5a710dafcc14c6c9f030aa2 (patch) | |
tree | fe922ca2647abb9def5b903c6e1e2e83c2d59066 /daemon | |
parent | c036541019018e363f0aa7bd705534baeb015b09 (diff) |
DBENGINE v2 - improvements part 6 (#14299)
* query preparation runs before extent reads
* populate mrg in parallel
* fix formatting warning
* first search for a metric then add it if it does not exist
* Revert "first search for a metric then add it if it does not exist"
This reverts commit 4afa6461fcce859d03f1c9cf56dd3b5933ee5ebc.
* Revert "fix formatting warning"
This reverts commit 49473493f7f1c3399b5635a573d3c6ed2b6e46f3.
* Revert "populate mrg in parallel"
This reverts commit a40166708d4222f6329904f109114c47c44ca666.
* merge journalfiles metrics before committing them to MRG
* Revert "merge journalfiles metrics before committing them to MRG"
This reverts commit 50c8934e23a0a09ea4da80e3f88290e46496ad92.
* Revert "Revert "populate mrg in parallel""
This reverts commit f4c149d2ab7a8c9af24a10f95438a0d662a5cf8a.
* Revert "Revert "fix formatting warning""
This reverts commit 78298ff9efc49806ded029f5f1e868cc42e8f6eb.
* Revert "Revert "first search for a metric then add it if it does not exist""
This reverts commit 997b9c813b290882ba18a8c44bf73f9ee5480adf.
* preload first and last journal files v2
* fix formatting warning
* parallel loading of tiers; cleanup of ctx structures
* use half the cores
* add partitions to metrics registry
* revert accidental change
* parallel processing according to MRG partitions; dont recalculate retention on exit
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/main.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/daemon/main.c b/daemon/main.c index 0d067c86a0..e5ab9d13a1 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -327,6 +327,14 @@ void netdata_cleanup_and_exit(int ret) { snprintfz(agent_incomplete_shutdown_file, FILENAME_MAX, "%s/.agent_incomplete_shutdown", netdata_configured_varlib_dir); (void) rename(agent_crash_file, agent_incomplete_shutdown_file); +#ifdef ENABLE_DBENGINE + if(dbengine_enabled) { + delta_shutdown_time("dbengine exit mode"); + for (size_t tier = 0; tier < storage_tiers; tier++) + rrdeng_exit_mode(multidb_ctx[tier]); + } +#endif + delta_shutdown_time("disable maintenance, new queries, new web requests, new streaming connections and aclk"); service_signal_exit( @@ -604,7 +612,7 @@ static void set_nofile_limit(struct rlimit *rl) { // make the soft/hard limits equal rl->rlim_cur = rl->rlim_max; if (setrlimit(RLIMIT_NOFILE, rl) != 0) { - error("setrlimit(RLIMIT_NOFILE, { %llu, %llu }) failed", rl->rlim_cur, rl->rlim_max); + error("setrlimit(RLIMIT_NOFILE, { %zu, %zu }) failed", (size_t)rl->rlim_cur, (size_t)rl->rlim_max); } // sanity check to make sure we have enough file descriptors available to open @@ -614,7 +622,7 @@ static void set_nofile_limit(struct rlimit *rl) { } if (rl->rlim_cur < 1024) - error("Number of open file descriptors allowed for this process is too low (RLIMIT_NOFILE=%zu)", (size_t) rl->rlim_cur); + error("Number of open file descriptors allowed for this process is too low (RLIMIT_NOFILE=%zu)", (size_t)rl->rlim_cur); } void cancel_main_threads() { |