Merge "Fixed the handling of metrics outside of the retention policy"
This commit is contained in:
commit
4bbb7d1f03
@ -57,8 +57,10 @@ class Persister(object):
|
|||||||
self._data_points = []
|
self._data_points = []
|
||||||
self._consumer.commit()
|
self._consumer.commit()
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
if ex.message.startswith("400: partial write: points beyond retention policy dropped"):
|
if "partial write: points beyond retention policy dropped" in ex.message:
|
||||||
LOG.info("Some points older than retention policy were dropped")
|
LOG.warning("Some points older than retention policy were dropped")
|
||||||
|
self._data_points = []
|
||||||
|
self._consumer.commit()
|
||||||
else:
|
else:
|
||||||
LOG.exception("Error writing to database: {}"
|
LOG.exception("Error writing to database: {}"
|
||||||
.format(self._data_points))
|
.format(self._data_points))
|
||||||
|
Loading…
Reference in New Issue
Block a user