)]}'
{"doc/manpages/proxy-server.conf.5":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"446cb634fffbe97ed2459d710905cdbc684e6b95","unresolved":false,"context_lines":[{"line_number":381,"context_line":".IP \\fBmemcache_conf_reload_time\\fR"},{"line_number":382,"context_line":"Time in seconds that must elapse before a reload of memcache.conf is"},{"line_number":383,"context_line":"attempted. If not set, this value defaults to 300. A non-positive value"},{"line_number":384,"context_line":"will disable this feature."},{"line_number":385,"context_line":".IP \\fBmemcache_max_connections\\fR"},{"line_number":386,"context_line":"Sets the maximum number of connections to each memcached server per worker."},{"line_number":387,"context_line":".IP \\fBmemcache_servers\\fR"}],"source_content_type":"text/troff","patch_set":11,"id":"9a68dd71_a42af2e5","line":384,"updated":"2016-01-27 00:53:25.000000000","message":"So its turned on if memcache_conf_reload_time is \u003e 0. Sure zero isn\u0027t positive, but some might get confused here. Can we just say make it 0, sure -\u0027ve is also False, so that\u0027s fine if they decide to do that.","commit_id":"c7e6d848159e15d126aa406519c319bc4eccec7d"},{"author":{"_account_id":21231,"name":"Bryan Keller","email":"kellerbr@us.ibm.com","username":"bkeller"},"change_message_id":"1a004056b19c46a8b54766bce059e4238b7a14ba","unresolved":false,"context_lines":[{"line_number":380,"context_line":"Enables the ability to log request headers. The default is False."},{"line_number":381,"context_line":".IP \\fBmemcache_conf_reload_time\\fR"},{"line_number":382,"context_line":"Time in seconds that must elapse before a reload of memcache.conf is"},{"line_number":383,"context_line":"attempted. If not set, this value defaults to 0, which means this feature"},{"line_number":384,"context_line":"will be disabled.  300 may be a reasonable setting if enabled."},{"line_number":385,"context_line":".IP \\fBmemcache_max_connections\\fR"},{"line_number":386,"context_line":"Sets the maximum number of connections to each memcached server per worker."}],"source_content_type":"text/troff","patch_set":19,"id":"9a629dbe_fa9741e9","line":383,"updated":"2016-11-11 17:36:06.000000000","message":"Standard language seems to be that it should end with \"The default is 0.\"","commit_id":"fc630c58b5cd34f717bdf5edc80526bc1ce3db26"}],"etc/proxy-server.conf-sample":[{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"bdec03b25a773e51190c3314b5ce01e34a5f35eb","unresolved":false,"context_lines":[{"line_number":401,"context_line":"# memcache_max_connections \u003d 2"},{"line_number":402,"context_line":"#"},{"line_number":403,"context_line":"# Sets the minimum amount of time (in seconds) that will pass between"},{"line_number":404,"context_line":"# memcache.conf reloads"},{"line_number":405,"context_line":"# reload_time \u003d 300"},{"line_number":406,"context_line":"#"},{"line_number":407,"context_line":"# More options documented in memcache.conf-sample"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"ba15a1d1_6252c7df","line":404,"updated":"2015-09-13 15:46:41.000000000","message":"NIT - end this sentence with a period for consistency.","commit_id":"07cdca7573b6d7b1fed63396c2a320eaf6b26e04"},{"author":{"_account_id":16964,"name":"Jonathan Hinson","email":"jlhinson@us.ibm.com","username":"jlhinson"},"change_message_id":"b92a335509318baa3f713ef548123048d82f7b13","unresolved":false,"context_lines":[{"line_number":401,"context_line":"# memcache_max_connections \u003d 2"},{"line_number":402,"context_line":"#"},{"line_number":403,"context_line":"# Sets the minimum amount of time (in seconds) that will pass between"},{"line_number":404,"context_line":"# memcache.conf reloads"},{"line_number":405,"context_line":"# reload_time \u003d 300"},{"line_number":406,"context_line":"#"},{"line_number":407,"context_line":"# More options documented in memcache.conf-sample"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"ba15a1d1_40faf0be","line":404,"in_reply_to":"ba15a1d1_6252c7df","updated":"2015-09-14 21:27:37.000000000","message":"Done","commit_id":"07cdca7573b6d7b1fed63396c2a320eaf6b26e04"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"99c7886769a14df3e3643812d1c3209143919b37","unresolved":false,"context_lines":[{"line_number":402,"context_line":"#"},{"line_number":403,"context_line":"# Sets the minimum amount of time (in seconds) that will pass between"},{"line_number":404,"context_line":"# memcache.conf reloads"},{"line_number":405,"context_line":"# reload_time \u003d 300"},{"line_number":406,"context_line":"#"},{"line_number":407,"context_line":"# More options documented in memcache.conf-sample"},{"line_number":408,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"5a2ca52d_b43947d9","line":405,"updated":"2015-10-16 16:40:59.000000000","message":"Shouldn\u0027t this be \"conf_reload_time\" instead of \"reload_time\"? (Based on what the key is in other files)","commit_id":"4f8c6d29d9aca010e6323448a48c3c0947754092"},{"author":{"_account_id":16964,"name":"Jonathan Hinson","email":"jlhinson@us.ibm.com","username":"jlhinson"},"change_message_id":"a62bad90bf2a4f418c74c24273c4c0e6a6056275","unresolved":false,"context_lines":[{"line_number":402,"context_line":"#"},{"line_number":403,"context_line":"# Sets the minimum amount of time (in seconds) that will pass between"},{"line_number":404,"context_line":"# memcache.conf reloads"},{"line_number":405,"context_line":"# reload_time \u003d 300"},{"line_number":406,"context_line":"#"},{"line_number":407,"context_line":"# More options documented in memcache.conf-sample"},{"line_number":408,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"5a2ca52d_148a7b1b","line":405,"in_reply_to":"5a2ca52d_b43947d9","updated":"2015-10-16 16:52:56.000000000","message":"Good eye. Thanks!","commit_id":"4f8c6d29d9aca010e6323448a48c3c0947754092"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"ae8032fe5f0b99daa2334a498831788c8688985b","unresolved":false,"context_lines":[{"line_number":402,"context_line":"#"},{"line_number":403,"context_line":"# Sets the minimum amount of time (in seconds) that will pass between"},{"line_number":404,"context_line":"# memcache.conf reloads"},{"line_number":405,"context_line":"# conf_reload_time \u003d 300"},{"line_number":406,"context_line":"#"},{"line_number":407,"context_line":"# More options documented in memcache.conf-sample"},{"line_number":408,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":6,"id":"5a2ca52d_eff038cb","line":405,"updated":"2015-10-16 23:22:18.000000000","message":"I\u0027d suggest being slightly more specific here and calling it \"memcache_conf_reload_time\" so there\u0027s no confusion about this reloading the whole proxy config file.","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"47ae599ab37fbf8ade548d7b25e0c2a527e9b35a","unresolved":false,"context_lines":[{"line_number":409,"context_line":"# Sets the minimum amount of time (in seconds) that will pass between"},{"line_number":410,"context_line":"# memcache.conf reloads. If not set, automatic reloads of memcache.conf will"},{"line_number":411,"context_line":"# be disabled."},{"line_number":412,"context_line":"# memcache_conf_reload_time \u003d 300"},{"line_number":413,"context_line":"#"},{"line_number":414,"context_line":"# More options documented in memcache.conf-sample"},{"line_number":415,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":10,"id":"da6ed579_4530c29e","line":412,"updated":"2016-01-13 00:33:47.000000000","message":"According the memcache.py, the default value, if not defined will be None (or really -1 when None fails the int()).\n\nThe values in proxy-server.conf-sample should be the same as the defaults. So this should read:\n\n  # memcache_conf_reload_time \u003d\n\nIf you want this feature turned on by default, which to me sounds like a good idea, then you need to change the default.","commit_id":"c9ed0f8389eb1916939817b776a1d1c10950e44e"},{"author":{"_account_id":16964,"name":"Jonathan Hinson","email":"jlhinson@us.ibm.com","username":"jlhinson"},"change_message_id":"7476c3b7b8a4420bd3e3c52d80467bad27208d05","unresolved":false,"context_lines":[{"line_number":409,"context_line":"# Sets the minimum amount of time (in seconds) that will pass between"},{"line_number":410,"context_line":"# memcache.conf reloads. If not set, automatic reloads of memcache.conf will"},{"line_number":411,"context_line":"# be disabled."},{"line_number":412,"context_line":"# memcache_conf_reload_time \u003d 300"},{"line_number":413,"context_line":"#"},{"line_number":414,"context_line":"# More options documented in memcache.conf-sample"},{"line_number":415,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":10,"id":"da6ed579_9e781f91","line":412,"in_reply_to":"da6ed579_4530c29e","updated":"2016-01-13 17:01:40.000000000","message":"Thanks. I\u0027ll fix this.\n\nI originally made it so that this feature was always on. Onovy argued that many admins would dislike that, which seems like a valid complaint, so I suggested that we disable it by default. (Maybe it should be enabled by default, with the option to disable it?)\n\nBtw, do you think 300 is a good recommended value for this? That\u0027s just the number I first threw out there, and no one has challenged it so far.","commit_id":"c9ed0f8389eb1916939817b776a1d1c10950e44e"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"3efe0288bea9c47ca54ff5a422c670ff63e8df9a","unresolved":false,"context_lines":[{"line_number":409,"context_line":"# Sets the minimum amount of time (in seconds) that will pass between"},{"line_number":410,"context_line":"# memcache.conf reloads. If not set, automatic reloads of memcache.conf will"},{"line_number":411,"context_line":"# be disabled."},{"line_number":412,"context_line":"# memcache_conf_reload_time \u003d 300"},{"line_number":413,"context_line":"#"},{"line_number":414,"context_line":"# More options documented in memcache.conf-sample"},{"line_number":415,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":10,"id":"da6ed579_4472d1ae","line":412,"in_reply_to":"da6ed579_9e781f91","updated":"2016-01-13 18:13:16.000000000","message":"My gut reaction is to enable by default with a reasonable value (300 seems sane) and a way to disable it.","commit_id":"c9ed0f8389eb1916939817b776a1d1c10950e44e"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"9959c98be38612fa61226084a1ec7be2bd53c0bc","unresolved":false,"context_lines":[{"line_number":410,"context_line":"# Sets the minimum amount of time (in seconds) that will pass between"},{"line_number":411,"context_line":"# memcache.conf reloads. If not set, this value defaults to 300. If set to 0,"},{"line_number":412,"context_line":"# this feature will be disabled."},{"line_number":413,"context_line":"# memcache_conf_reload_time \u003d 300"},{"line_number":414,"context_line":"#"},{"line_number":415,"context_line":"# More options documented in memcache.conf-sample"},{"line_number":416,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":13,"id":"3a57f1b5_81cf3b28","line":413,"updated":"2016-02-12 05:45:47.000000000","message":"Do you think this should go in memcache.conf itself too?\n\nJust curious; I\u0027m not sure of the right answer. If it\u0027s loaded from memcache.conf itself, too, then an operator can update the reload setting (including turning it on or off) without restarting the proxy process.","commit_id":"cd7b1c026c36be75ed1d028d2fde12831f18f1df"}],"swift/common/middleware/memcache.py":[{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"bdec03b25a773e51190c3314b5ce01e34a5f35eb","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.reload_time \u003d int(conf.get(\u0027conf_reload_time\u0027, 300))"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.app \u003d app"},{"line_number":40,"context_line":"        self._reload(True)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def __call__(self, env, start_response):"},{"line_number":43,"context_line":"        if time() \u003e self._rtime:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_f830c609","line":40,"updated":"2015-09-13 15:46:41.000000000","message":"Minor but - your call to _reload here is required, as _reload is overloaded in this context to also setup _rtime the first time in, that is someone may think in the future (don\u0027t bother reloading upon entry) but that would be bad.  I think this is Ok and I can\u0027t really think of anything better except maybe:\n- In init just explicitly call _update_rtime, _load, _update_mtime (and as a result you can remove the \u0027force\u0027 param).  But this would result in more code so maybe it\u0027s not the best idea.","commit_id":"07cdca7573b6d7b1fed63396c2a320eaf6b26e04"},{"author":{"_account_id":16964,"name":"Jonathan Hinson","email":"jlhinson@us.ibm.com","username":"jlhinson"},"change_message_id":"b92a335509318baa3f713ef548123048d82f7b13","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.reload_time \u003d int(conf.get(\u0027conf_reload_time\u0027, 300))"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.app \u003d app"},{"line_number":40,"context_line":"        self._reload(True)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def __call__(self, env, start_response):"},{"line_number":43,"context_line":"        if time() \u003e self._rtime:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_80f3280a","line":40,"in_reply_to":"ba15a1d1_f830c609","updated":"2015-09-14 21:27:37.000000000","message":"I see what you\u0027re saying, but for consistency, I tried to follow the structure of the reloading done in ring.py. They also use the \u0027force\u0027 param.","commit_id":"07cdca7573b6d7b1fed63396c2a320eaf6b26e04"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"bdec03b25a773e51190c3314b5ce01e34a5f35eb","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _update_mtime(self):"},{"line_number":53,"context_line":"        if isfile(self.conf_path):"},{"line_number":54,"context_line":"            self._mtime \u003d getmtime(self.conf_path)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _reload(self, force\u003dFalse):"},{"line_number":57,"context_line":"        self._update_rtime()"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_d83f02d5","line":54,"updated":"2015-09-13 15:46:41.000000000","message":"Do you have a very small but possible race condition here ?  That is the IF check passes but by the next line the file get\u0027s deleted ?  If so getmtime will raise  os.error exception, should we catch this ?  Maybe one can argue that\u0027s possible with any of the conf files but here we\u0027re explicitly checking for its existence ?","commit_id":"07cdca7573b6d7b1fed63396c2a320eaf6b26e04"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"bdec03b25a773e51190c3314b5ce01e34a5f35eb","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            allow_unpickle\u003d(serialization_format \u003c\u003d 1),"},{"line_number":137,"context_line":"            max_conns\u003dmax_conns)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def has_changed(self):"},{"line_number":140,"context_line":"        if not isfile(self.conf_path):"},{"line_number":141,"context_line":"            if self.conf_file_exists:"},{"line_number":142,"context_line":"                self.conf_file_exists \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_38063e21","line":139,"updated":"2015-09-13 15:46:41.000000000","message":"NIT - technically this should be called has_changed_and_exists : )  Assuming we count deleting the file as a change.  But I can\u0027t think of a better name for this so no worries.","commit_id":"07cdca7573b6d7b1fed63396c2a320eaf6b26e04"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"bdec03b25a773e51190c3314b5ce01e34a5f35eb","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                self.conf_file_exists \u003d True"},{"line_number":150,"context_line":"                return True"},{"line_number":151,"context_line":"            else:"},{"line_number":152,"context_line":"                return getmtime(self.conf_path) !\u003d self._mtime"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"def filter_factory(global_conf, **local_conf):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_782596c0","line":152,"updated":"2015-09-13 15:46:41.000000000","message":"Do you have a very small but possible race condition here ?  That is the IF check passes but by the next line the file get\u0027s deleted ?  If so getmtime will raise  os.error exception, should we catch this ?","commit_id":"07cdca7573b6d7b1fed63396c2a320eaf6b26e04"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"858fe255f2c49d24e2f021791e13192ea013386d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.conf_path \u003d os.path.join(conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027),"},{"line_number":35,"context_line":"                                      \u0027memcache.conf\u0027)"},{"line_number":36,"context_line":"        self.conf_file_exists \u003d isfile(self.conf_path)"},{"line_number":37,"context_line":"        self.reload_time \u003d int(conf.get(\u0027conf_reload_time\u0027, 300))"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.app \u003d app"},{"line_number":40,"context_line":"        self._reload(True)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_bc95a533","line":37,"updated":"2015-10-16 20:41:56.000000000","message":"What if conf_reload_time is not valid and we get a ValueError from int()? Is this even possible, or does the configuration prevent this and just return the default value if the configuration value is invalid?\n\nAlso, should we prevent 0 or negative values? What effect would those values have? (Not sure if such error checking is required, just wondering)","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"0e3dac7a488260f3f119104b8d19e696e65effd9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.conf_path \u003d os.path.join(conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027),"},{"line_number":35,"context_line":"                                      \u0027memcache.conf\u0027)"},{"line_number":36,"context_line":"        self.conf_file_exists \u003d isfile(self.conf_path)"},{"line_number":37,"context_line":"        self.reload_time \u003d int(conf.get(\u0027conf_reload_time\u0027, 300))"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.app \u003d app"},{"line_number":40,"context_line":"        self._reload(True)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_fbc8f956","line":37,"in_reply_to":"5a2ca52d_2fe1502d","updated":"2015-10-17 12:32:05.000000000","message":"Okay, thanks John, makes sense to me.","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"ae8032fe5f0b99daa2334a498831788c8688985b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.conf_path \u003d os.path.join(conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027),"},{"line_number":35,"context_line":"                                      \u0027memcache.conf\u0027)"},{"line_number":36,"context_line":"        self.conf_file_exists \u003d isfile(self.conf_path)"},{"line_number":37,"context_line":"        self.reload_time \u003d int(conf.get(\u0027conf_reload_time\u0027, 300))"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.app \u003d app"},{"line_number":40,"context_line":"        self._reload(True)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_2fe1502d","line":37,"in_reply_to":"5a2ca52d_bc95a533","updated":"2015-10-16 23:22:18.000000000","message":"This is fine. It follows the pattern of *many* other config settings in swift. Try to coerce them to the proper type; if it fails, the process won\u0027t start. That\u0027s ok.","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"858fe255f2c49d24e2f021791e13192ea013386d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            try:"},{"line_number":55,"context_line":"                self._mtime \u003d getmtime(self.conf_path)"},{"line_number":56,"context_line":"            except OSError:"},{"line_number":57,"context_line":"                pass"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _reload(self, force\u003dFalse):"},{"line_number":60,"context_line":"        self._update_rtime()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_1c585987","line":57,"updated":"2015-10-16 20:41:56.000000000","message":"Any need to log a {warning, error} that the memcache.conf file couldn\u0027t be accessed, for whatever reason?","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":16964,"name":"Jonathan Hinson","email":"jlhinson@us.ibm.com","username":"jlhinson"},"change_message_id":"ffb0f37061afde402d07658a956820982325a59d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            try:"},{"line_number":55,"context_line":"                self._mtime \u003d getmtime(self.conf_path)"},{"line_number":56,"context_line":"            except OSError:"},{"line_number":57,"context_line":"                pass"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _reload(self, force\u003dFalse):"},{"line_number":60,"context_line":"        self._update_rtime()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_62e764ac","line":57,"in_reply_to":"5a2ca52d_1c585987","updated":"2015-10-16 21:43:12.000000000","message":"Do you mean when we catch the OSError? I don\u0027t think that\u0027s necessary. I think this block will only be reached if the user (intentionally) deletes the conf file.","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"ae8032fe5f0b99daa2334a498831788c8688985b","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            try:"},{"line_number":55,"context_line":"                self._mtime \u003d getmtime(self.conf_path)"},{"line_number":56,"context_line":"            except OSError:"},{"line_number":57,"context_line":"                pass"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _reload(self, force\u003dFalse):"},{"line_number":60,"context_line":"        self._update_rtime()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_afd6c025","line":57,"in_reply_to":"5a2ca52d_62e764ac","updated":"2015-10-16 23:22:18.000000000","message":"Something at warning level probably wouldn\u0027t be bad here. Files can go away, and we should loudly alert when that happens.","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"858fe255f2c49d24e2f021791e13192ea013386d","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                pass"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _reload(self, force\u003dFalse):"},{"line_number":60,"context_line":"        self._update_rtime()"},{"line_number":61,"context_line":"        if force or self.has_changed():"},{"line_number":62,"context_line":"            self._load()"},{"line_number":63,"context_line":"            self._update_mtime()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_7cd38dd5","line":60,"updated":"2015-10-16 20:41:56.000000000","message":"Any need to log an info message whenever the memcache.conf file is reloaded?","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"0e3dac7a488260f3f119104b8d19e696e65effd9","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                pass"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _reload(self, force\u003dFalse):"},{"line_number":60,"context_line":"        self._update_rtime()"},{"line_number":61,"context_line":"        if force or self.has_changed():"},{"line_number":62,"context_line":"            self._load()"},{"line_number":63,"context_line":"            self._update_mtime()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_9bc30538","line":60,"in_reply_to":"5a2ca52d_6fdc2846","updated":"2015-10-17 12:32:05.000000000","message":"Agree on debug level; info level would be too verbose.","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"ae8032fe5f0b99daa2334a498831788c8688985b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                pass"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _reload(self, force\u003dFalse):"},{"line_number":60,"context_line":"        self._update_rtime()"},{"line_number":61,"context_line":"        if force or self.has_changed():"},{"line_number":62,"context_line":"            self._load()"},{"line_number":63,"context_line":"            self._update_mtime()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_6fdc2846","line":60,"in_reply_to":"5a2ca52d_7cd38dd5","updated":"2015-10-16 23:22:18.000000000","message":"A debug level \"memcache.conf was reloaded\" message would be good.","commit_id":"a05f0bb5fe2634a6c439d18b19cabbb7d4166d23"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"7e1ea1b9f695b835bf8f2689c65bef75b5bc5969","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return self.app(env, start_response)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _update_rtime(self):"},{"line_number":53,"context_line":"        self._rtime \u003d time() + self.reload_time"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _update_mtime(self):"},{"line_number":56,"context_line":"        if isfile(self.conf_path):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_86466c79","line":53,"updated":"2015-12-11 17:05:24.000000000","message":"memcached settings should be reloaded at almost same time in whole cluster. when self.reload_time will be 300 seconds, it will take 5 minutes to reload memcached config in whole cluster. this will lead to cache misses - servers will have different configuration for 5 minutes.\n\nwhy not reload at regular intervals on all servers? just round _rtime to self.reload_time (up?). So on every server it will reload at 1:00, 1:05, etc.","commit_id":"8d3d2f08cf67226a235dda74e31e211dc121a060"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"47ae599ab37fbf8ade548d7b25e0c2a527e9b35a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                                      \u0027memcache.conf\u0027)"},{"line_number":39,"context_line":"        self.conf_file_exists \u003d isfile(self.conf_path)"},{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            self.reload_time \u003d int(conf.get(\u0027memcache_conf_reload_time\u0027))"},{"line_number":42,"context_line":"            self.conf_reload_enabled \u003d True"},{"line_number":43,"context_line":"        except TypeError:"},{"line_number":44,"context_line":"            self.reload_time \u003d -1"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_05b40acf","line":41,"updated":"2016-01-13 00:33:47.000000000","message":"Like I said previously, if we want to have this on by default then we need to set one:\n\n  self.reload_time \u003d int(conf.get(\u0027memcache_conf_reload_time\u0027, 300))\n\nThat is to say if we want to set the default to 5 minutes.","commit_id":"c9ed0f8389eb1916939817b776a1d1c10950e44e"},{"author":{"_account_id":16964,"name":"Jonathan Hinson","email":"jlhinson@us.ibm.com","username":"jlhinson"},"change_message_id":"7476c3b7b8a4420bd3e3c52d80467bad27208d05","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                                      \u0027memcache.conf\u0027)"},{"line_number":39,"context_line":"        self.conf_file_exists \u003d isfile(self.conf_path)"},{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            self.reload_time \u003d int(conf.get(\u0027memcache_conf_reload_time\u0027))"},{"line_number":42,"context_line":"            self.conf_reload_enabled \u003d True"},{"line_number":43,"context_line":"        except TypeError:"},{"line_number":44,"context_line":"            self.reload_time \u003d -1"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_9e8c9f36","line":41,"in_reply_to":"da6ed579_05b40acf","updated":"2016-01-13 17:01:40.000000000","message":"Some people don\u0027t like this feature, so I have it disabled by default for now.","commit_id":"c9ed0f8389eb1916939817b776a1d1c10950e44e"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"9959c98be38612fa61226084a1ec7be2bd53c0bc","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.conf_reload_enabled \u003d True if self.reload_interval \u003e 0 else False"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.app \u003d app"},{"line_number":44,"context_line":"        self._reload(True)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def __call__(self, env, start_response):"},{"line_number":47,"context_line":"        if time() \u003e self._rtime:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a57f1b5_21d767ee","line":44,"updated":"2016-02-12 05:45:47.000000000","message":"I think it\u0027s dangerous that _rtime and _mtime aren\u0027t initialized here.\n\nNo, your code doesn\u0027t break now, but that\u0027s only because of the way if statements work in Python. (Imagine if you called _reload(False) before ever doing _reload(True). has_changed() compares agains _mtime without it being initialized.)","commit_id":"cd7b1c026c36be75ed1d028d2fde12831f18f1df"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"9959c98be38612fa61226084a1ec7be2bd53c0bc","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def _update_mtime(self):"},{"line_number":61,"context_line":"        if isfile(self.conf_path):"},{"line_number":62,"context_line":"            try:"},{"line_number":63,"context_line":"                self._mtime \u003d getmtime(self.conf_path)"},{"line_number":64,"context_line":"            except OSError:"},{"line_number":65,"context_line":"                self.logger.warning(\"memcache.conf has been removed\")"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a57f1b5_81fc1b73","line":63,"updated":"2016-02-12 05:45:47.000000000","message":"I don\u0027t like that you have two places you call getmtime(), and in normal operation you\u0027re calling it twice to reload. It seems you should be able to refactor this to only one stat of the file to get the mtime.","commit_id":"cd7b1c026c36be75ed1d028d2fde12831f18f1df"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"9959c98be38612fa61226084a1ec7be2bd53c0bc","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            if self.conf_file_exists:"},{"line_number":158,"context_line":"                self.logger.warning(\"memcache.conf has been removed\")"},{"line_number":159,"context_line":"                self.conf_file_exists \u003d False"},{"line_number":160,"context_line":"                return True"},{"line_number":161,"context_line":"            else:"},{"line_number":162,"context_line":"                return False"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a57f1b5_e1670f4b","line":160,"updated":"2016-02-12 05:45:47.000000000","message":"I think it\u0027s an interesting choice to mark the file as having changed after it disappears. In this case, you end up throwing away currently loaded values and using the defaults.\n\nI\u0027m not sure your choice is wrong, but my first guess as to what would have happened is that the currently loaded stuff gets persisted and nothing is reloaded. Perhaps don\u0027t update the mtime of the file so it keeps getting checked, but don\u0027t blow away the loaded values.","commit_id":"cd7b1c026c36be75ed1d028d2fde12831f18f1df"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abf9a260cec84190ee567417d1b5c15928e8f83f","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def __call__(self, env, start_response):"},{"line_number":53,"context_line":"        if time() \u003e self._rtime:"},{"line_number":54,"context_line":"            self._reload()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        env[\u0027swift.cache\u0027] \u003d self.memcache"},{"line_number":57,"context_line":"        return self.app(env, start_response)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a89bdaa_1db99e15","line":54,"updated":"2016-09-12 20:23:56.000000000","message":"With _reload in the request path, how do we want to handle config errors? I see some int() and float() calls -- if they raise ValueErrors, we currently 500 the request; is that intentional? I think we probably want to make this more like\n\n try:\n     self._reload()\n except:\n     self.logger.exception(...)\n \u003ccontinue processing request\u003e","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"638bff27c5db150d79debe04a84ac14935a3f17d","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def __call__(self, env, start_response):"},{"line_number":53,"context_line":"        if time() \u003e self._rtime:"},{"line_number":54,"context_line":"            self._reload()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        env[\u0027swift.cache\u0027] \u003d self.memcache"},{"line_number":57,"context_line":"        return self.app(env, start_response)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_167090db","line":54,"in_reply_to":"9a89bdaa_1db99e15","updated":"2016-10-01 05:54:31.000000000","message":"Great suggestion.  Added this and a test to go with it.","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abf9a260cec84190ee567417d1b5c15928e8f83f","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        if self.conf_reload_enabled:"},{"line_number":61,"context_line":"            cur_time \u003d time()"},{"line_number":62,"context_line":"            r \u003d cur_time % self.reload_interval"},{"line_number":63,"context_line":"            self._rtime \u003d cur_time - r + self.reload_interval"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _update_mtime(self):"},{"line_number":66,"context_line":"        if self._new_mtime:"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a89bdaa_42dee711","line":63,"updated":"2016-09-12 20:23:56.000000000","message":"Is it important that self._rtime be aligned to self.reload_interval? Why not just say\n\n self._rtime \u003d time() + self.reload_interval\n\n?","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"638bff27c5db150d79debe04a84ac14935a3f17d","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        if self.conf_reload_enabled:"},{"line_number":61,"context_line":"            cur_time \u003d time()"},{"line_number":62,"context_line":"            r \u003d cur_time % self.reload_interval"},{"line_number":63,"context_line":"            self._rtime \u003d cur_time - r + self.reload_interval"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _update_mtime(self):"},{"line_number":66,"context_line":"        if self._new_mtime:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_d9057b11","line":63,"in_reply_to":"9a89bdaa_42dee711","updated":"2016-10-01 05:54:31.000000000","message":"It had been like this in the first patchset, but this was a change in patchset 11 reaction to the comment in patchset 8.  I am open to discussion on the matter.","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abf9a260cec84190ee567417d1b5c15928e8f83f","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _stat_conf_file(self):"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            self._new_mtime \u003d getmtime(self.conf_path)"},{"line_number":73,"context_line":"            return True"},{"line_number":74,"context_line":"        except OSError:"},{"line_number":75,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a89bdaa_6a2d7d45","line":72,"updated":"2016-09-12 20:23:56.000000000","message":"In light of screwy bugs like https://bugs.launchpad.net/swift/+bug/1621255:\n\nWhat if memcache.conf is a directory instead of a file? Currently, the stat will succeed, we\u0027ll see the new mtime, and we\u0027ll reload with only the values from proxy-server.conf. Alternatively, we could treat that like memcache.conf being deleted and keep the old values. I\u0027m not sure which is the right thing to do; what are your thoughts?","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"638bff27c5db150d79debe04a84ac14935a3f17d","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _stat_conf_file(self):"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            self._new_mtime \u003d getmtime(self.conf_path)"},{"line_number":73,"context_line":"            return True"},{"line_number":74,"context_line":"        except OSError:"},{"line_number":75,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_abd4ce1f","line":72,"in_reply_to":"9a89bdaa_6a2d7d45","updated":"2016-10-01 05:54:31.000000000","message":"Changed to get both time and mode in one stat.  then only proceed if the conf is a file.  Added a test where the conf is a directory.","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abf9a260cec84190ee567417d1b5c15928e8f83f","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                        pass"},{"line_number":131,"context_line":"            else:"},{"line_number":132,"context_line":"                self.logger.debug(\"memcache.conf not found. Loading default \""},{"line_number":133,"context_line":"                                  \"memcache settings.\")"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        # while memcache.conf options are the base for the memcache"},{"line_number":136,"context_line":"        # middleware, if you set the same option also in the filter"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a89bdaa_016cdc33","line":133,"updated":"2016-09-12 20:23:56.000000000","message":"This doesn\u0027t seem to accurately capture what\u0027s going on here. Really, all we know is that we\u0027re using a default value for at least one of memcache_servers, memcache_serialization_support, or memcache_max_connections; other config options (like the various timeouts) may still be provided in the filter config.\n\nMaybe we just want\n\n\u003e memcache.conf not found. Loading memcache settings from proxy-server.conf.\n\n? Also, should we add a similar else block out one level?","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"638bff27c5db150d79debe04a84ac14935a3f17d","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                        pass"},{"line_number":131,"context_line":"            else:"},{"line_number":132,"context_line":"                self.logger.debug(\"memcache.conf not found. Loading default \""},{"line_number":133,"context_line":"                                  \"memcache settings.\")"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        # while memcache.conf options are the base for the memcache"},{"line_number":136,"context_line":"        # middleware, if you set the same option also in the filter"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_cb311a5c","line":133,"in_reply_to":"9a89bdaa_016cdc33","updated":"2016-10-01 05:54:31.000000000","message":"Done","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abf9a260cec84190ee567417d1b5c15928e8f83f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            \u0027pool_timeout\u0027, POOL_TIMEOUT))"},{"line_number":143,"context_line":"        tries \u003d int(memcache_options.get(\u0027tries\u0027, TRY_COUNT))"},{"line_number":144,"context_line":"        io_timeout \u003d float(memcache_options.get(\u0027io_timeout\u0027, IO_TIMEOUT))"},{"line_number":145,"context_line":"        # default is to disable config reload"},{"line_number":146,"context_line":"        self.proc_reload_time("},{"line_number":147,"context_line":"            int(memcache_options.get(\u0027memcache_conf_reload_time\u0027, 0)))"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a89bdaa_e4a466a7","line":145,"updated":"2016-09-12 20:23:56.000000000","message":"This doesn\u0027t match any of the places where we\u0027ve documented the default.","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"638bff27c5db150d79debe04a84ac14935a3f17d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            \u0027pool_timeout\u0027, POOL_TIMEOUT))"},{"line_number":143,"context_line":"        tries \u003d int(memcache_options.get(\u0027tries\u0027, TRY_COUNT))"},{"line_number":144,"context_line":"        io_timeout \u003d float(memcache_options.get(\u0027io_timeout\u0027, IO_TIMEOUT))"},{"line_number":145,"context_line":"        # default is to disable config reload"},{"line_number":146,"context_line":"        self.proc_reload_time("},{"line_number":147,"context_line":"            int(memcache_options.get(\u0027memcache_conf_reload_time\u0027, 0)))"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_6b4726bc","line":145,"in_reply_to":"9a89bdaa_e4a466a7","updated":"2016-10-01 05:54:31.000000000","message":"The comments on the review imply this should be the default. But when I took over the review from Jonathan, the code and docs were all reflecting the opposite.  I changed the code to match what the comments suggested.  But then later talked with Jonathan, and he said there had been more discussion that went the other way.  I say we get a final call on which way to go, and then I will update across the board.","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abf9a260cec84190ee567417d1b5c15928e8f83f","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            return self._new_mtime !\u003d self._mtime"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            if self.conf_existed_before:"},{"line_number":174,"context_line":"                self.logger.warning(\"memcache.conf has been removed\")"},{"line_number":175,"context_line":"            self.conf_existed_before \u003d False"},{"line_number":176,"context_line":"            return False"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a89bdaa_027f7fab","line":174,"range":{"start_line":174,"start_character":60,"end_line":174,"end_character":67},"updated":"2016-09-12 20:23:56.000000000","message":"This isn\u0027t the only way we could get here. What if the parent directory is no longer readable? Might be better as\n\n\u003e Could not get last-modified time of memcache.conf","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"638bff27c5db150d79debe04a84ac14935a3f17d","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            return self._new_mtime !\u003d self._mtime"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            if self.conf_existed_before:"},{"line_number":174,"context_line":"                self.logger.warning(\"memcache.conf has been removed\")"},{"line_number":175,"context_line":"            self.conf_existed_before \u003d False"},{"line_number":176,"context_line":"            return False"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_0b5dc278","line":174,"range":{"start_line":174,"start_character":60,"end_line":174,"end_character":67},"in_reply_to":"9a89bdaa_027f7fab","updated":"2016-10-01 05:54:31.000000000","message":"Done","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abf9a260cec84190ee567417d1b5c15928e8f83f","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            if self.conf_existed_before:"},{"line_number":174,"context_line":"                self.logger.warning(\"memcache.conf has been removed\")"},{"line_number":175,"context_line":"            self.conf_existed_before \u003d False"},{"line_number":176,"context_line":"            return False"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a89bdaa_e2529b66","line":175,"updated":"2016-09-12 20:23:56.000000000","message":"Should we clear self._mtime here? I\u0027m torn; I think the nature of the stat failure makes a difference:\n\n* If the conf disappears then reappears, I feel like we ought to reload, even if the new one has the same mtime.\n* If the conf had its permissions changed and we couldn\u0027t read it but then someone fixed it, maybe we don\u0027t have to?","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"638bff27c5db150d79debe04a84ac14935a3f17d","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            if self.conf_existed_before:"},{"line_number":174,"context_line":"                self.logger.warning(\"memcache.conf has been removed\")"},{"line_number":175,"context_line":"            self.conf_existed_before \u003d False"},{"line_number":176,"context_line":"            return False"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a98d1f4_ab7a0eef","line":175,"in_reply_to":"9a89bdaa_e2529b66","updated":"2016-10-01 05:54:31.000000000","message":"I see your point.  Technically, you could write a file there with the same - or earlier mtime.  I\u0027d rather error on the side of maybe reload when it was unnecessary, as opposed to being finicky about the time strictly increasing.  Doesn\u0027t seem the like the unnecessary reload case (which is unlikely to happen) would be a reoccurring thing, so maybe not too much of an issue.\n\nthat is what I went with.","commit_id":"be1374317d4c21a6760e342f2f670905a4af8d5c"},{"author":{"_account_id":21231,"name":"Bryan Keller","email":"kellerbr@us.ibm.com","username":"bkeller"},"change_message_id":"1a004056b19c46a8b54766bce059e4238b7a14ba","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def proc_reload_time(self, time):"},{"line_number":50,"context_line":"        self.reload_interval \u003d time"},{"line_number":51,"context_line":"        self.conf_reload_enabled \u003d True if self.reload_interval \u003e 0 else False"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __call__(self, env, start_response):"},{"line_number":54,"context_line":"        if time() \u003e self._rtime:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a629dbe_80cdf867","line":51,"updated":"2016-11-11 17:36:06.000000000","message":"`True if ... else False` seems a bit redundant here.","commit_id":"fc630c58b5cd34f717bdf5edc80526bc1ce3db26"},{"author":{"_account_id":21231,"name":"Bryan Keller","email":"kellerbr@us.ibm.com","username":"bkeller"},"change_message_id":"1a004056b19c46a8b54766bce059e4238b7a14ba","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        else:"},{"line_number":184,"context_line":"            if self.conf_existed_before:"},{"line_number":185,"context_line":"                self.logger.warning("},{"line_number":186,"context_line":"                    \"Could not get last-modified time of memcache.conf\")"},{"line_number":187,"context_line":"            self.conf_existed_before \u003d False"},{"line_number":188,"context_line":"            self._mtime \u003d 0"},{"line_number":189,"context_line":"            self._new_mtime \u003d None"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a629dbe_c057f023","line":186,"updated":"2016-11-11 17:36:06.000000000","message":"Is `conf_existed_before` worth tracking just for this potential warning?","commit_id":"fc630c58b5cd34f717bdf5edc80526bc1ce3db26"}],"test/unit/common/middleware/test_memcache.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"47ae599ab37fbf8ade548d7b25e0c2a527e9b35a","unresolved":false,"context_lines":[{"line_number":713,"context_line":"            self.fail(\"Uncaught OSError\")"},{"line_number":714,"context_line":"        finally:"},{"line_number":715,"context_line":"            memcache.isfile \u003d orig_isfile"},{"line_number":716,"context_line":"            memcache.getmtime \u003d orig_getmtime"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"    def test_has_changed_error_handling(self):"},{"line_number":719,"context_line":"        app \u003d memcache.MemcacheMiddleware("}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_402f50f6","line":716,"updated":"2016-01-13 00:33:47.000000000","message":"Manually monkey patching, although works well expecially as your using a try/finally to turn it back. Mock has already been imported into this file so probably better to use it\u0027s monkey patching features:\n\n  with mock.patch(\u0027\u003cpath\u003e\u0027, return_value\u003dTrue):\n\nSomething like http://paste.openstack.org/show/483679/\n\nWhich I think simplifies the code.","commit_id":"c9ed0f8389eb1916939817b776a1d1c10950e44e"},{"author":{"_account_id":16964,"name":"Jonathan Hinson","email":"jlhinson@us.ibm.com","username":"jlhinson"},"change_message_id":"7476c3b7b8a4420bd3e3c52d80467bad27208d05","unresolved":false,"context_lines":[{"line_number":713,"context_line":"            self.fail(\"Uncaught OSError\")"},{"line_number":714,"context_line":"        finally:"},{"line_number":715,"context_line":"            memcache.isfile \u003d orig_isfile"},{"line_number":716,"context_line":"            memcache.getmtime \u003d orig_getmtime"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"    def test_has_changed_error_handling(self):"},{"line_number":719,"context_line":"        app \u003d memcache.MemcacheMiddleware("}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_3e9a5364","line":716,"in_reply_to":"da6ed579_402f50f6","updated":"2016-01-13 17:01:40.000000000","message":"Done","commit_id":"c9ed0f8389eb1916939817b776a1d1c10950e44e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"558db4d18b86d741378d1c157ddfd71ff1fd8666","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"class TestCacheMiddleware(unittest.TestCase):"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    MEM_PATH \u003d \u0027swift.common.middleware.memcache\u0027"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_cache_middleware(self):"},{"line_number":106,"context_line":"        app \u003d FakeSwift()"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a98d1f4_0ba2224b","line":103,"updated":"2016-10-01 05:59:31.000000000","message":"Removed the setup because only one test used self.app.  It didn\u0027t like seeing that happen needlessly when debugging.  Also, now using FakeSwift in the test_cache_middleware.  I think this helps to make a more thorough test.","commit_id":"9e469e0ecd51d1f09b9f9c19e386f8ba9e3061b3"}]}
