Merge pull request #4109 from ktsaou/master

do not clear the database when it refers to the future
This commit is contained in:
Costa Tsaousis 2018-09-06 00:13:21 +03:00 committed by GitHub
commit cd3cef55d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -588,8 +588,8 @@ RRDSET *rrdset_create_custom(
memset(st, 0, size);
}
else if(st->last_updated.tv_sec > now + update_every) {
error("File %s refers to the future. Clearing it.", fullfilename);
memset(st, 0, size);
error("File %s refers to the future by %zd secs. Resetting it to now.", fullfilename, (ssize_t)(st->last_updated.tv_sec - now));
st->last_updated.tv_sec = now;
}
// make sure the database is aligned