Closed standaloneSA closed 5 years ago
It sounds like counts
and watermarks
in _MetricCache
may need to use with self.lock:
to avoid thread-safety issues.
I guess your cache size grows which results in that part of the code being slower and the change of the data being modified in another thread larger. Should be easy fixable with adding a list() around self.items() so mimic python2 behaviour, but from reading your link this would mean the whole cache is copied which is quite inneficient. Think adding a lock might better.
I`ve also faced the issue.
The fix was insufficient, issue still present.
Fix released in 1.1.5
I haven't completely narrowed down what is changing, but after running properly for some time, carbon-cache is failing with an unhandled error:
From what I can tell, this may be an incompatability with Python 3 ( per https://stackoverflow.com/questions/11941817/how-to-avoid-runtimeerror-dictionary-changed-size-during-iteration-error ).
The machine is Ubuntu 16.04, with carbon 1.1.4 installed from pip.
If I can give any other information on the machine or environment, please let me know. Thanks!
--Matt