Browse code

lib/srdb1: use the proper field for latency db limit

(cherry picked from commit 7560edb8aac6b60a5c4392db21c16e4096bf529d)
(cherry picked from commit 8d1996ac6c6c7b1445bcb8f4589bfc3b1cfed805)
(cherry picked from commit c3132d81f52197938b9be5616233d59ddc7126f2)

Daniel-Constantin Mierla authored on 02/04/2019 11:45:56
Showing 1 changed files
... ...
@@ -47,14 +47,14 @@ static inline int db_do_submit_query(const db1_con_t* _h, const str *_query,
47 47
 	int ret;
48 48
 	unsigned int ms = 0;
49 49
 
50
-	if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0))
50
+	if(unlikely(cfg_get(core, core_cfg, latency_limit_db)>0))
51 51
 		ms = TICKS_TO_MS(get_ticks_raw());
52 52
 
53 53
 	ret = submit_query(_h, _query);
54 54
 
55
-	if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0)) {
55
+	if(unlikely(cfg_get(core, core_cfg, latency_limit_db)>0)) {
56 56
 		ms = TICKS_TO_MS(get_ticks_raw()) - ms;
57
-		if(ms >= cfg_get(core, core_cfg, latency_limit_action)) {
57
+		if(ms >= cfg_get(core, core_cfg, latency_limit_db)) {
58 58
 				LOG(cfg_get(core, core_cfg, latency_log),
59 59
 					"alert - query execution too long [%u ms] for [%.*s]\n",
60 60
 				   ms, _query->len<50?_query->len:50, _query->s);