)]}'
{"bin/swift-error-limits":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"38d59e83fb4d3277e486e9619a8f4023d8d2c169","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            err_limit \u003d \u0027%.2f%%\u0027 % (numerator / denominator * 100)"},{"line_number":48,"context_line":"        print pr([node_id, total_reqs, total_errors, err_limit])"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    return 0"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"baada198_7c415135","line":50,"updated":"2014-08-08 10:26:34.000000000","message":"I\u0027m actually sorta board with the whole \"add functions in bin scripts cause they\u0027re just a hack and we don\u0027t wanna test \u0027em... \u003cmonths pass\u003e now we want to change them... and *then* we have to move them in into a module and add tests\" song and dance.\n\nCan you just put this in common.error_limiter to start with?","commit_id":"b30618ab335bb791e694cc3630863ba5c4071fb1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4114831903ac67cd95631e40db6f4707850cad12","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            err_limit \u003d \u0027%.2f%%\u0027 % (numerator / denominator * 100)"},{"line_number":48,"context_line":"        print pr([node_id, total_reqs, total_errors, err_limit])"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    return 0"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"1abeadc6_eced0b27","line":50,"in_reply_to":"1abeadc6_f13b249a","updated":"2014-08-25 21:17:40.000000000","message":"hey man, don\u0027t act like I\u0027m twistin\u0027 your arm :D\n\nYou know it ain\u0027t gunna get to stay here forever - but, if you want to wait and see if you can get some other poor sap move to it later - just tell me to piss off ;)","commit_id":"b30618ab335bb791e694cc3630863ba5c4071fb1"},{"author":{"_account_id":995,"name":"David Goetz","email":"david.goetz@rackspace.com","username":"david-goetz"},"change_message_id":"521ce75709ca80f50bfe4ec6d614b4b15ade7b87","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            err_limit \u003d \u0027%.2f%%\u0027 % (numerator / denominator * 100)"},{"line_number":48,"context_line":"        print pr([node_id, total_reqs, total_errors, err_limit])"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    return 0"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"1abeadc6_f13b249a","line":50,"in_reply_to":"baada198_7c415135","updated":"2014-08-25 20:45:13.000000000","message":"ok fine. sheesh.","commit_id":"b30618ab335bb791e694cc3630863ba5c4071fb1"}],"doc/source/deployment_guide.rst":[{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"0164e8b39e018f092c6485f29585f66e040b5660","unresolved":false,"context_lines":[{"line_number":951,"context_line":"                              default          definition of a swift_owner is"},{"line_number":952,"context_line":"                              headers\u003e         up to the auth system in use,"},{"line_number":953,"context_line":"                                               but usually indicates"},{"line_number":954,"context_line":"                                               administrative responsibilities."},{"line_number":955,"context_line":"error_limit_config                             Use \"default\" to turn on with"},{"line_number":956,"context_line":"                                               default settings (requires"},{"line_number":957,"context_line":"                                               directory:"}],"source_content_type":"text/x-rst","patch_set":3,"id":"baa201ad_a8811a91","line":954,"updated":"2014-09-30 21:31:37.000000000","message":"When the error_limiter is shown to be useful, I don\u0027t see why we would not want it to enable by default. So I suggest that this flag is called \"error_limit_enabled\" with a (current) default of \"false\". Later, we can switch the default to \"true\".\n\nA true/false is easier to understand than a not mentioned, \"default\" or a path.\n\nA non standard path (for /var/run/swift/error_limiter)  can be specified in /etc/error_limiter.conf file.","commit_id":"21d9ea7d9877e045090aeb4cfdb98b3d0e0aadbf"},{"author":{"_account_id":995,"name":"David Goetz","email":"david.goetz@rackspace.com","username":"david-goetz"},"change_message_id":"18d9afb07364167be17d2926827d5ad99331814b","unresolved":false,"context_lines":[{"line_number":951,"context_line":"                              default          definition of a swift_owner is"},{"line_number":952,"context_line":"                              headers\u003e         up to the auth system in use,"},{"line_number":953,"context_line":"                                               but usually indicates"},{"line_number":954,"context_line":"                                               administrative responsibilities."},{"line_number":955,"context_line":"error_limit_config                             Use \"default\" to turn on with"},{"line_number":956,"context_line":"                                               default settings (requires"},{"line_number":957,"context_line":"                                               directory:"}],"source_content_type":"text/x-rst","patch_set":3,"id":"baa201ad_5a53c56a","line":954,"in_reply_to":"baa201ad_a8811a91","updated":"2014-10-03 17:10:53.000000000","message":"I went back and forth about this and thought this was the easiest way. First I made it a separate config file because the proxy server config is already so huge. Also, this setting specifies where that config is- not where the run_dir is. If you had a non-standard config path you wouldn\u0027t be able to specify it. I know its a little different than what\u0027s normally there but I thought it was the cleanest way to do it.","commit_id":"21d9ea7d9877e045090aeb4cfdb98b3d0e0aadbf"}],"doc/source/error_limiter.rst":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"38d59e83fb4d3277e486e9619a8f4023d8d2c169","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"limited_average \u003d float((5 * 5) + (0 * 3) + (3 * 2) + (2 * 1) + (4 * 1)) /"},{"line_number":56,"context_line":"     ((10 * 5) + (8 * 3) + (4 * 2) + (7 * 1) + (11 * 1))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"which resolves to 0.37. So:"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"if random() \u003c limited_average:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"baada198_5128f697","line":57,"updated":"2014-08-08 10:26:34.000000000","message":"oh my head.  why am i seeing fibonacci in the weights here?","commit_id":"b30618ab335bb791e694cc3630863ba5c4071fb1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5f01d72aff22c4c77df899b0adc1b777732d10d0","unresolved":false,"context_lines":[{"line_number":76,"context_line":"Give that directory write permissions to the user you run the proxy"},{"line_number":77,"context_line":"servers as."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"in :ref:`proxy-server-config`) add the line:"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"error_limit_config \u003d default"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9aa7fdbe_a401e139","line":79,"updated":"2014-10-24 09:05:08.000000000","message":"the closing ) looks really strange when this is rendered.","commit_id":"12d5856879a9b5262a997923486774a69678944d"}],"etc/proxy-server.conf-sample":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5f01d72aff22c4c77df899b0adc1b777732d10d0","unresolved":false,"context_lines":[{"line_number":208,"context_line":"# To use the adaptive error-limiting feature of the proxy server set this"},{"line_number":209,"context_line":"# to the path of your error-limiter.conf. Or \"default\" if you want to run"},{"line_number":210,"context_line":"# with the default settings. FYI: this feature is EXPERIMENTAL."},{"line_number":211,"context_line":"# error_limit_conf_path \u003d"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"[filter:tempauth]"},{"line_number":214,"context_line":"use \u003d egg:swift#tempauth"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"9aa7fdbe_0498ed1a","line":211,"updated":"2014-10-24 09:05:08.000000000","message":"oh, i think maybe just \"error_limit_config\" is the new hawtness","commit_id":"12d5856879a9b5262a997923486774a69678944d"}],"swift/common/error_limiter.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"38d59e83fb4d3277e486e9619a8f4023d8d2c169","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        with closing(conn.cursor()) as cur:"},{"line_number":128,"context_line":"            cur.execute(\u0027PRAGMA synchronous \u003d OFF\u0027)"},{"line_number":129,"context_line":"            cur.execute(\u0027PRAGMA temp_store \u003d MEMORY\u0027)"},{"line_number":130,"context_line":"            cur.execute(\u0027PRAGMA journal_mode \u003d MEMORY\u0027)"},{"line_number":131,"context_line":"        return conn"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def initialize(self, db_path):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_71a09a36","line":130,"updated":"2014-08-08 10:26:34.000000000","message":"wow, i didn\u0027t know about any of these, makes we want to go back and dust off a hack i gave up on because sqlite in /run/shm was still too slow.\n\nBut i was trying to do expiration in the db, I like your rotate out and reload some data from the old db approach...","commit_id":"b30618ab335bb791e694cc3630863ba5c4071fb1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"38d59e83fb4d3277e486e9619a8f4023d8d2c169","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            weighted_average \u003d min("},{"line_number":340,"context_line":"                numerator / denominator, self.max_error_limit_perc)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"            return random.random() \u003c weighted_average"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_dc025d07","line":342,"updated":"2014-08-08 10:26:34.000000000","message":"wat?  why the coin flip?","commit_id":"b30618ab335bb791e694cc3630863ba5c4071fb1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4114831903ac67cd95631e40db6f4707850cad12","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            weighted_average \u003d min("},{"line_number":340,"context_line":"                numerator / denominator, self.max_error_limit_perc)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"            return random.random() \u003c weighted_average"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_0c6ec7c9","line":342,"in_reply_to":"1abeadc6_31cf5cb2","updated":"2014-08-25 21:17:40.000000000","message":"note to future version of me who forget how dfg explained this in channel:\n\nweighted_average is the percentage of requests you want to send to a node.\n\nIf only a few requests have failed (weighted_average rather lowish), you\u0027d only want to back off a little bit and see if things get better.  If quite near *all* requests are failing (weighted_average is rather highish) you\u0027d only want to send one here and there to ping it and see if it\u0027s out of the woods.\n\nSince this is called on most every request that might talk to that node with a slowly sliding weighted_average the random.random call is just helping you hit your target error limiting request percentage.","commit_id":"b30618ab335bb791e694cc3630863ba5c4071fb1"},{"author":{"_account_id":995,"name":"David Goetz","email":"david.goetz@rackspace.com","username":"david-goetz"},"change_message_id":"521ce75709ca80f50bfe4ec6d614b4b15ade7b87","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            weighted_average \u003d min("},{"line_number":340,"context_line":"                numerator / denominator, self.max_error_limit_perc)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"            return random.random() \u003c weighted_average"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_31cf5cb2","line":342,"in_reply_to":"baada198_dc025d07","updated":"2014-08-25 20:45:13.000000000","message":"ok- going to get back to this now. the idea with the coin flip was that the error limiter would just slow down requests to the failing node and hopefully they\u0027d be able to start handling traffic after a while. since we\u0027re actually using the requests to test whether the node is working or not this is a way to see when it gets back online. just fyi- the line above limits the amount of limiting to 90%. so even if the node is failing every single request the proxy will send 10% of requests to it by default.","commit_id":"b30618ab335bb791e694cc3630863ba5c4071fb1"}],"swift/proxy/server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5f01d72aff22c4c77df899b0adc1b777732d10d0","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        # client chunk size as the govenor and not the object chunk size."},{"line_number":203,"context_line":"        socket._fileobject.default_bufsize \u003d self.client_chunk_size"},{"line_number":204,"context_line":"        self.error_limiter \u003d None"},{"line_number":205,"context_line":"        if \u0027error_limit_config\u0027 in conf:"},{"line_number":206,"context_line":"            try:"},{"line_number":207,"context_line":"                self.error_limiter \u003d ErrorLimiter("},{"line_number":208,"context_line":"                    conf.get(\u0027error_limit_config\u0027), self.logger)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa7fdbe_04638d42","line":205,"updated":"2014-10-24 09:05:08.000000000","message":"for me this needed to be error_limit_conf_path","commit_id":"12d5856879a9b5262a997923486774a69678944d"}]}
