On Thu, 07, Nov, 2019 at 10:57:23AM +0100, Morten Brekkevold spoke thus.. > The carbon-cache package in Debian Buster is definitely BROKEN - it just > keeps crashing.
Hi, We've been running with the attached patch since December which fixes the problem. Thorsten (as you're the last uploader) - I'm happy to prepare a stable update to fix this, but the version is the same in stable/testing so can't do so currently. There are two point release (1.1.5 and 1.1.6) for this package but they seem to be tied into other graphite-* package updates too. Would you accept an NMU to unstable with just this patch and then an accompanying stable update? This problem basically makes graphite-carbon unusable in buster. Thanks. Mark -- Mark Hymers <mhy at debian dot org>
--- graphite-carbon/lib/carbon/cache.py 2020-01-11 11:58:15.877162033 +0000 +++ cache.py 2020-01-11 11:55:19.516768965 +0000 @@ -184,7 +185,8 @@ if not self: return (None, []) if self.strategy: - metric = self.strategy.choose_item() + with self.lock: + metric = self.strategy.choose_item() else: # Avoid .keys() as it dumps the whole list metric = next(iter(self)) @@ -206,18 +208,18 @@ def store(self, metric, datapoint): timestamp, value = datapoint - if timestamp not in self[metric]: - # Not a duplicate, hence process if cache is not full - if self.is_full: - log.msg("MetricCache is full: self.size=%d" % self.size) - events.cacheFull() - else: - with self.lock: + with self.lock: + if timestamp not in self[metric]: + # Not a duplicate, hence process if cache is not full + if self.is_full: + log.msg("MetricCache is full: self.size=%d" % self.size) + events.cacheFull() + else: self.size += 1 self[metric][timestamp] = value - else: - # Updating a duplicate does not increase the cache size - self[metric][timestamp] = value + else: + # Updating a duplicate does not increase the cache size + self[metric][timestamp] = value _Cache = None
signature.asc
Description: PGP signature