summaryrefslogtreecommitdiffstats
path: root/database/engine/rrdengine.h
diff options
context:
space:
mode:
authorMarkos Fountoulakis <44345837+mfundul@users.noreply.github.com>2019-09-24 11:59:15 +0300
committerGitHub <noreply@github.com>2019-09-24 11:59:15 +0300
commit2728be8b0614fd58d4b530a32fee164509e88fd8 (patch)
treeabd39375b249b832327e35880597f9974be81b22 /database/engine/rrdengine.h
parent7977137cee3274d2535fbdb49ec2d68941285b82 (diff)
Detect deadlock in dbengine page cache (#6911)
* Detect deadlock in dbengine page cache when there are too many metrics and print error message * Resolve dbengine deadlock by dropping metrics when page cache is too small and define relevant alarms * Changed printing deadlock errors to only happen once per dbengine instance
Diffstat (limited to 'database/engine/rrdengine.h')
-rw-r--r--database/engine/rrdengine.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/database/engine/rrdengine.h b/database/engine/rrdengine.h
index 6f6a6f8ffd..6447a685bd 100644
--- a/database/engine/rrdengine.h
+++ b/database/engine/rrdengine.h
@@ -148,12 +148,25 @@ struct rrdengine_statistics {
rrdeng_stats_t page_cache_descriptors;
rrdeng_stats_t io_errors;
rrdeng_stats_t fs_errors;
+ rrdeng_stats_t pg_cache_warnings;
+ rrdeng_stats_t pg_cache_errors;
};
/* I/O errors global counter */
extern rrdeng_stats_t global_io_errors;
/* File-System errors global counter */
extern rrdeng_stats_t global_fs_errors;
+/*
+ * Page cache warnings global counter.
+ * Some page cache instance is near critical utilization where metrics will fail to be stored.
+ */
+extern rrdeng_stats_t global_pg_cache_warnings;
+/*
+ * Page cache errors global counter.
+ * Some page cache instance has hit critical utilization where metrics failed to be stored as a deadlock resolution
+ * measure.
+ */
+extern rrdeng_stats_t global_pg_cache_errors;
/* number of File-Descriptors that have been reserved by dbengine */
extern rrdeng_stats_t rrdeng_reserved_file_descriptors;