summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorMarkos Fountoulakis <44345837+mfundul@users.noreply.github.com>2019-12-07 22:14:39 +0200
committerChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-12-07 12:14:39 -0800
commita4562ebe89f5fa700198646305180ad536dfdf69 (patch)
treef04ac04a84a6abe95eeebe8032b49bf765f5fbea /database
parent7e6e405c146b17cb60711883770aa67d0fbae185 (diff)
Fix dbengine dirty page flushing warning (#7469)
Diffstat (limited to 'database')
-rwxr-xr-x[-rw-r--r--]database/engine/rrdengineapi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/database/engine/rrdengineapi.c b/database/engine/rrdengineapi.c
index 0ae3d44d28..f824728798 100644..100755
--- a/database/engine/rrdengineapi.c
+++ b/database/engine/rrdengineapi.c
@@ -628,13 +628,13 @@ void rrdeng_commit_page(struct rrdengine_instance *ctx, struct rrdeng_page_descr
nr_committed_pages = ++pg_cache->committed_page_index.nr_committed_pages;
uv_rwlock_wrunlock(&pg_cache->committed_page_index.lock);
- if (nr_committed_pages >= (pg_cache_hard_limit(ctx) - (unsigned long)ctx->stats.metric_API_producers) / 2) {
+ if (nr_committed_pages >= (ctx->max_cache_pages) / 2 + (unsigned long)ctx->stats.metric_API_producers) {
/* 50% of pages have not been committed yet */
if (0 == (unsigned long)ctx->stats.flushing_errors) {
/* only print the first time */
- error("Failed to flush quickly enough in dbengine instance \"%s\""
- ". Metric data will not be stored in the database"
- ", please reduce disk load or use a faster disk.", ctx->dbfiles_path);
+ error("Failed to flush dirty buffers quickly enough in dbengine instance \"%s\"."
+ "Metric data at risk of not being stored in the database, "
+ "please reduce disk load or use a faster disk.", ctx->dbfiles_path);
}
rrd_stat_atomic_add(&ctx->stats.flushing_errors, 1);
rrd_stat_atomic_add(&global_flushing_errors, 1);