)]}'
{"keystone/common/kvs/core.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"9cfb58966719b7ae49c9a503297d577738bc45a4","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"BACKENDS_REGISTERED \u003d False"},{"line_number":40,"context_line":"CONF \u003d cfg.CONF"},{"line_number":41,"context_line":"KEY_VALUE_STORE_REGISTRY \u003d weakref.WeakValueDictionary()"},{"line_number":42,"context_line":"LOCK_WINDOW \u003d 1"},{"line_number":43,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":44,"context_line":"NO_VALUE \u003d api.NO_VALUE"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_15450c16","side":"PARENT","line":41,"updated":"2015-08-27 17:04:20.000000000","message":"do you also need to protect the initialization of this variable?","commit_id":"4a5a12c19f9be7e09f544d7264d496268ca0a851"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"0ab8167604bf69139aea5990e7861084e8cd7c5d","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"BACKENDS_REGISTERED \u003d False"},{"line_number":40,"context_line":"CONF \u003d cfg.CONF"},{"line_number":41,"context_line":"KEY_VALUE_STORE_REGISTRY \u003d weakref.WeakValueDictionary()"},{"line_number":42,"context_line":"LOCK_WINDOW \u003d 1"},{"line_number":43,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":44,"context_line":"NO_VALUE \u003d api.NO_VALUE"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_9fd1125a","side":"PARENT","line":41,"in_reply_to":"da20952f_15450c16","updated":"2015-08-28 10:07:21.000000000","message":"Ideally - yes. It can be re-created on race condition during import in the moment when the module is already created but not yet in sys.modules. \nBut to the moment of get_key_value_store call KEY_VALUE_STORE_REGISTRY is already initialized and imported (it\u0027s latest instance). If it actually was the race condition, fantom variable will be swept by garbage collection and all threads will be using the same registry instance.\nIf some sleeping new thread awakens, it receives needed modules from sys.modules rather than actually re-importing them.","commit_id":"4a5a12c19f9be7e09f544d7264d496268ca0a851"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ffe42835204aee9405e1d112bc13d380662dcc59","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        try:"},{"line_number":247,"context_line":"            self._region.configure_from_config(conf_dict, \u0027%s.\u0027 % prefix)"},{"line_number":248,"context_line":"        except dogpile_exception.RegionAlreadyConfigured as e:"},{"line_number":249,"context_line":"            LOG.debug(str(e))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def _mutex(self, key):"},{"line_number":252,"context_line":"        return self._lock_registry.get(key)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_548de128","line":249,"updated":"2015-09-09 03:43:23.000000000","message":"I\u0027m not really clear on what the point of this try/except is? Is the except block actually reachable now? Who is supposed to see this debug log and what are they supposed to do about it?\n\nThe rest of the patch makes sense to me.","commit_id":"588d29b4b75cec10bd19102b81c7899d9b57589a"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"adc130341af14def48b99213bc2322ab5bf45a02","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        try:"},{"line_number":247,"context_line":"            self._region.configure_from_config(conf_dict, \u0027%s.\u0027 % prefix)"},{"line_number":248,"context_line":"        except dogpile_exception.RegionAlreadyConfigured as e:"},{"line_number":249,"context_line":"            LOG.debug(str(e))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def _mutex(self, key):"},{"line_number":252,"context_line":"        return self._lock_registry.get(key)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_3f3a4635","line":249,"in_reply_to":"da20952f_27280b85","updated":"2015-09-10 12:36:39.000000000","message":"Dave, in this particular case persistent config makes reconfiguration to have no effect. I think critical section is not needed here.","commit_id":"588d29b4b75cec10bd19102b81c7899d9b57589a"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"ac5cd97e0b7e1e6f9e1189b1e8204d6945c0865a","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        try:"},{"line_number":247,"context_line":"            self._region.configure_from_config(conf_dict, \u0027%s.\u0027 % prefix)"},{"line_number":248,"context_line":"        except dogpile_exception.RegionAlreadyConfigured as e:"},{"line_number":249,"context_line":"            LOG.debug(str(e))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def _mutex(self, key):"},{"line_number":252,"context_line":"        return self._lock_registry.get(key)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_5a35c8d8","line":249,"in_reply_to":"da20952f_3f3a4635","updated":"2015-09-10 14:05:32.000000000","message":"Cherry-picked the solution with critical section: https://review.openstack.org/#/c/222173/","commit_id":"588d29b4b75cec10bd19102b81c7899d9b57589a"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"59c332d3b9d035361cdbdac3f18dd6804bcae56e","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        try:"},{"line_number":247,"context_line":"            self._region.configure_from_config(conf_dict, \u0027%s.\u0027 % prefix)"},{"line_number":248,"context_line":"        except dogpile_exception.RegionAlreadyConfigured as e:"},{"line_number":249,"context_line":"            LOG.debug(str(e))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def _mutex(self, key):"},{"line_number":252,"context_line":"        return self._lock_registry.get(key)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_8c9cc05e","line":249,"in_reply_to":"da20952f_548de128","updated":"2015-09-09 11:16:03.000000000","message":"Dolph, this code is executed during request rather than app initialization and, as you can see, not protected against race condition. In our case race condition occurs during request in this very call (traceback added to the bug).\ndogpile.cache research revealed that RegionAlreadyConfigured is raised when several concurrent threads are attempting to configure region for the first use and aims to prevent any change to configuration \"on-the-fly\".\nIn our case config is persistent so the exception can be safely ignored.\nThe other (and more robust) solution was offered by Boris Bobrov internally: just wrap it in critical section, though I think it\u0027s an overkill to tackle the lock on every request.","commit_id":"588d29b4b75cec10bd19102b81c7899d9b57589a"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"339478d655aba6eb2e7b174a571af942cff6f551","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        try:"},{"line_number":247,"context_line":"            self._region.configure_from_config(conf_dict, \u0027%s.\u0027 % prefix)"},{"line_number":248,"context_line":"        except dogpile_exception.RegionAlreadyConfigured as e:"},{"line_number":249,"context_line":"            LOG.debug(str(e))"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def _mutex(self, key):"},{"line_number":252,"context_line":"        return self._lock_registry.get(key)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_27280b85","line":249,"in_reply_to":"da20952f_8c9cc05e","updated":"2015-09-10 05:26:12.000000000","message":"I was thinking why persistent config could ignore the exception (RegionAlreadyConfigured) here?\n\nwhy not protect against race condition for such a request?","commit_id":"588d29b4b75cec10bd19102b81c7899d9b57589a"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"213a81dd061f6ff3c0cd34ef480180b994ffc3da","unresolved":false,"context_lines":[{"line_number":45,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":46,"context_line":"NO_VALUE \u003d api.NO_VALUE"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"key_value_store_lock \u003d threading.Lock()"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def _register_backends():"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_9f4111ac","line":48,"updated":"2016-05-10 20:31:23.000000000","message":"Yay no extra magic needed for handling eventlet vs non-eventlet here.","commit_id":"e4d6eb8eccd6a774e311671f8e4dd23b3e355fbf"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"213a81dd061f6ff3c0cd34ef480180b994ffc3da","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        # condition, so just notify about the exception."},{"line_number":268,"context_line":"        try:"},{"line_number":269,"context_line":"            self._region.configure_from_config(conf_dict, \u0027%s.\u0027 % prefix)"},{"line_number":270,"context_line":"        except dogpile_exception.RegionAlreadyConfigured as e:"},{"line_number":271,"context_line":"            LOG.debug(str(e))"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def _mutex(self, key):"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_7f3eed28","line":270,"updated":"2016-05-10 20:31:23.000000000","message":"In the next(upcoming? some release?) dogpile can now handle the reconfiguration cases. We should look to move to supporting that and bumping the minimums respectively.","commit_id":"e4d6eb8eccd6a774e311671f8e4dd23b3e355fbf"}]}
