summaryrefslogtreecommitdiffstats
path: root/aclk
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-04-07 21:25:01 +0300
committerGitHub <noreply@github.com>2023-04-07 21:25:01 +0300
commit204dd9ae272445d13f308badb07e99675fa34892 (patch)
treef42e873c60219b5031dcfc3e076adb2398cdb3fe /aclk
parent61925baaf6e2448c641e8e71248a47f7a01c4efd (diff)
Boost dbengine (#14832)
* configure extent cache size * workers can now execute up to 10 jobs in a run, boosting query prep and extent reads * fix dispatched and executing counters * boost to the max * increase libuv worker threads * query prep always get more prio than extent reads; stop processing in batch when dbengine is queue is critical * fix accounting of query prep * inlining of time-grouping functions, to speed up queries with billions of points * make switching based on a local const variable * print one pending contexts loading message per iteration * inlined store engine query API * inlined storage engine data collection api * inlined all storage engine query ops * eliminate and inline data collection ops * simplified query group-by * more error handling * optimized partial trimming of group-by queries * preparative work to support multiple passes of group-by * more preparative work to support multiple passes of group-by (accepts multiple group-by params) * unified query timings * unified query timings - weights endpoint * query target is no longer a static thread variable - there is a list of cached query targets, each of which of freed every 1000 queries * fix query memory accounting * added summary.dimension[].pri and sorted summary.dimensions based on priority and then name * limit max ACLK WEB response size to 30MB * the response type should be text/plain * more preparative work for multiple group-by passes * create functions for generating group by keys, ids and names * multiple group-by passes are now supported * parse group-by options array also with an index * implemented percentage-of-instance group by function * family is now merged in multi-node contexts * prevent uninitialized use
Diffstat (limited to 'aclk')
-rw-r--r--aclk/aclk_query.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/aclk/aclk_query.c b/aclk/aclk_query.c
index 6ad2c43b70..1d00cdca3e 100644
--- a/aclk/aclk_query.c
+++ b/aclk/aclk_query.c
@@ -5,6 +5,7 @@
#include "aclk_tx_msgs.h"
#define WEB_HDR_ACCEPT_ENC "Accept-Encoding:"
+#define ACLK_MAX_WEB_RESPONSE_SIZE (30 * 1024 * 1024)
pthread_cond_t query_cond_wait = PTHREAD_COND_INITIALIZER;
pthread_mutex_t query_lock_wait = PTHREAD_MUTEX_INITIALIZER;
@@ -22,6 +23,13 @@ static usec_t aclk_web_api_request(RRDHOST *host, struct web_client *w, char *ur
else
w->response.code = web_client_api_request_v1(host, w, url);
+ if(buffer_strlen(w->response.data) > ACLK_MAX_WEB_RESPONSE_SIZE) {
+ buffer_flush(w->response.data);
+ buffer_strcat(w->response.data, "response is too big");
+ w->response.data->content_type = CT_TEXT_PLAIN;
+ w->response.code = HTTP_RESP_CONTENT_TOO_LONG;
+ }
+
t = now_monotonic_high_precision_usec() - t;
if (aclk_stats_enabled) {