)]}'
{"swift/common/storage_policy.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f957b54a96a2062823bb75d4db7465842e5e7558","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @property"},{"line_number":167,"context_line":"    def needs_multiphase_put(self):"},{"line_number":168,"context_line":"        raise NotImplementedError"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"class ReplicationStoragePolicy(StoragePolicy):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_f7f6785c","line":168,"updated":"2015-03-02 03:54:03.000000000","message":"I like having NotImplementedError\u0027s thrown in the base class, but I wonder if when creating a new storage policy do we need have to implement _everything_. Seeing as the idea of a base class is inheritance.\n\nWe could make the default to this False (in base class) and then not have to overwrite the method in Repl class.","commit_id":"364f4c3ae5fc31c651a40a08d726018b2293a7de"}],"swift/obj/diskfile.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"5bab3063133faf6b5f0b3c032b4b5c07f856842e","unresolved":false,"context_lines":[{"line_number":885,"context_line":"        self._threadpool.force_run_in_thread("},{"line_number":886,"context_line":"            self._finalize_put, metadata, target_path)"},{"line_number":887,"context_line":""},{"line_number":888,"context_line":"    def write_durable_timestamp(self, timestamp):"},{"line_number":889,"context_line":"        \"\"\""},{"line_number":890,"context_line":"        Finalize put by writing a timestamp.durable file for the object. We"},{"line_number":891,"context_line":"        do this for policies that requires a 2-phase put commit confirmation."}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_27598935","line":888,"updated":"2015-02-18 01:42:05.000000000","message":"You should probably put \"UpgradeImpact\" in the commit message for this change. People using other DiskFile implementations will need to modify their code to support this method.\n\nAlso, does the in-memory diskfile need to have this added to it, or does it get this method through some inheritance or something?","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"add65f3c13549bc6b7663389df59a0276a0060ee","unresolved":false,"context_lines":[{"line_number":885,"context_line":"        self._threadpool.force_run_in_thread("},{"line_number":886,"context_line":"            self._finalize_put, metadata, target_path)"},{"line_number":887,"context_line":""},{"line_number":888,"context_line":"    def write_durable_timestamp(self, timestamp):"},{"line_number":889,"context_line":"        \"\"\""},{"line_number":890,"context_line":"        Finalize put by writing a timestamp.durable file for the object. We"},{"line_number":891,"context_line":"        do this for policies that requires a 2-phase put commit confirmation."}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_8aff9933","line":888,"in_reply_to":"da86d52c_27598935","updated":"2015-02-18 03:28:28.000000000","message":"I have this fixed in a version that I am working on (one with the object server tests in place).  I will add \"UpgradeImpact\" to the commit message.  Thanks for pointing out, Sam.","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e6049e3be3bbea1d48594172feb6a5cc334e8f6f","unresolved":false,"context_lines":[{"line_number":896,"context_line":"        try:"},{"line_number":897,"context_line":"            open(target_path, \u0027w\u0027).close()"},{"line_number":898,"context_line":"        except OSError:"},{"line_number":899,"context_line":"            logging.exception(_(\u0027Problem finalizing commit: %s\u0027), target_path)"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":""},{"line_number":902,"context_line":"class DiskFileReader(object):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_9510914f","line":899,"updated":"2015-02-18 11:56:17.000000000","message":"I think there is a \"raise\" missing here, to ensure the Exception is handled by the calling method. Otherwise the server doesn\u0027t return an HTTPServerError","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"cb49b56a308fe174641a71c9f51595b5a8c87d73","unresolved":false,"context_lines":[{"line_number":896,"context_line":"        try:"},{"line_number":897,"context_line":"            open(target_path, \u0027w\u0027).close()"},{"line_number":898,"context_line":"        except OSError:"},{"line_number":899,"context_line":"            logging.exception(_(\u0027Problem finalizing commit: %s\u0027), target_path)"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":""},{"line_number":902,"context_line":"class DiskFileReader(object):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_970b2b2a","line":899,"in_reply_to":"da86d52c_9510914f","updated":"2015-02-18 16:31:34.000000000","message":"Christian - you are right - this was caught by one of the obj server test cases I am about to post.  Sorry this version didn\u0027t have all the test cases yet.  :)","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    return to_dir"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"def get_ondisk_files(files, datadir):"},{"line_number":216,"context_line":"    \"\"\""},{"line_number":217,"context_line":"    Given a simple list of files names, determine the files to use."},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_d84d079b","line":215,"updated":"2015-03-02 17:56:55.000000000","message":"so this overlaps with two other Ec related features that are being done on a separate patch of mine (acoles is also working on) regarding obj server not returning anything unless it has a .durable and hash_cleanup_listdir only killing files older than .durable.  I think the right plan for now is to accept these changes as they work with the rest of this patch and then when those other land understand that some adjustments may be needed here....","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"052384a27df7d76eace24bb119a878ab99dcc451","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    return to_dir"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"def get_ondisk_files(files, datadir):"},{"line_number":216,"context_line":"    \"\"\""},{"line_number":217,"context_line":"    Given a simple list of files names, determine the files to use."},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_f26bb8b6","line":215,"in_reply_to":"ba7be1f8_d84d079b","updated":"2015-03-02 22:09:04.000000000","message":"Ack","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":905,"context_line":"        try:"},{"line_number":906,"context_line":"            open(durable_ts_path, \u0027w\u0027).close()"},{"line_number":907,"context_line":"        except OSError:"},{"line_number":908,"context_line":"            logging.exception(_(\u0027Problem writing durable state file: %s\u0027),"},{"line_number":909,"context_line":"                              durable_ts_path)"},{"line_number":910,"context_line":"            raise"},{"line_number":911,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_1b8956ca","line":908,"updated":"2015-03-02 17:56:55.000000000","message":"missing error test case - will double check and make sure its not a coverage reporting error and if not I\u0027ll add a trello item to add a specific test case for OSErrror during this operation","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"052384a27df7d76eace24bb119a878ab99dcc451","unresolved":false,"context_lines":[{"line_number":905,"context_line":"        try:"},{"line_number":906,"context_line":"            open(durable_ts_path, \u0027w\u0027).close()"},{"line_number":907,"context_line":"        except OSError:"},{"line_number":908,"context_line":"            logging.exception(_(\u0027Problem writing durable state file: %s\u0027),"},{"line_number":909,"context_line":"                              durable_ts_path)"},{"line_number":910,"context_line":"            raise"},{"line_number":911,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_7248a85c","line":908,"in_reply_to":"ba7be1f8_1b8956ca","updated":"2015-03-02 22:09:04.000000000","message":"This one was tricky to write a test case for.\n\nI will try to bring up the test coverage as a separate patch, perhaps.","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":1692,"context_line":"            deleter.put({\u0027X-Timestamp\u0027: timestamp})"},{"line_number":1693,"context_line":""},{"line_number":1694,"context_line":"    def is_durable(self):"},{"line_number":1695,"context_line":"        \"\"\""},{"line_number":1696,"context_line":"        Verify the presence of a .durable state file present for the timestamp."},{"line_number":1697,"context_line":"        Indicates a \u0027durable\u0027 copy of the object."},{"line_number":1698,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_b3ff9400","line":1695,"updated":"2015-03-02 17:56:55.000000000","message":"same comment as before, this may or may nor end up staying after the other patch(s) that deal with on disk files and rules around .durable land.\n\nplus, is this only used by testcode??","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"052384a27df7d76eace24bb119a878ab99dcc451","unresolved":false,"context_lines":[{"line_number":1692,"context_line":"            deleter.put({\u0027X-Timestamp\u0027: timestamp})"},{"line_number":1693,"context_line":""},{"line_number":1694,"context_line":"    def is_durable(self):"},{"line_number":1695,"context_line":"        \"\"\""},{"line_number":1696,"context_line":"        Verify the presence of a .durable state file present for the timestamp."},{"line_number":1697,"context_line":"        Indicates a \u0027durable\u0027 copy of the object."},{"line_number":1698,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_125becf6","line":1695,"in_reply_to":"ba7be1f8_b3ff9400","updated":"2015-03-02 22:09:04.000000000","message":"This is only used by testcode, yes.  I thought about it when coming up with this yesterday, but it was convenient to leave this private to DiskFile and use the existing class properties - datadir, timestamp, _get_ondisk_file(), etc.\n\nI was hoping this should find users other than just the test case(s)? :)","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"}],"swift/obj/server.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"5bab3063133faf6b5f0b3c032b4b5c07f856842e","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        except StopIteration:"},{"line_number":367,"context_line":"            raise HTTPBadRequest(body\u003d\"couldn\u0027t find PUT commit MIME doc\")"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        timeout_reader \u003d self._make_timeout_reader(commit_iter)"},{"line_number":370,"context_line":"        try:"},{"line_number":371,"context_line":"            commit_body \u003d \u0027\u0027.join(iter(timeout_reader, \u0027\u0027))"},{"line_number":372,"context_line":"        except ChunkReadTimeout:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_8c8fbacc","line":369,"updated":"2015-02-18 01:42:05.000000000","message":"I think it\u0027d be better to look for a MIME doc with \"X-Document: commit-confirmation\", or whatever header we sent, than this construct. The main reason is that MIME document bodies can get really big, and here we are slurping the whole thing into memory. Now, it\u0027s only *supposed* to be a few tens of bytes, but still. This makes me nervous.\n\nIf we were to look for a particular MIME header and then just drain the body iterator without saving its pieces, we could avoid chewing all the RAM if the proxy sends us a giant document after the object-body document or we get confused as to which document is which.\n\nAs a nice bonus, this method would then completely cover the reading of the commit-confirmation document. Either it returns (success!) or raises (failure!), but in neither case does the caller require any further thought.","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"add65f3c13549bc6b7663389df59a0276a0060ee","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        except StopIteration:"},{"line_number":367,"context_line":"            raise HTTPBadRequest(body\u003d\"couldn\u0027t find PUT commit MIME doc\")"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        timeout_reader \u003d self._make_timeout_reader(commit_iter)"},{"line_number":370,"context_line":"        try:"},{"line_number":371,"context_line":"            commit_body \u003d \u0027\u0027.join(iter(timeout_reader, \u0027\u0027))"},{"line_number":372,"context_line":"        except ChunkReadTimeout:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_8ad879f0","line":369,"in_reply_to":"da86d52c_8c8fbacc","updated":"2015-02-18 03:28:28.000000000","message":"I agree with all being said here.  The commit_confirmation body was mainly for debug as I ran into a ton of problems (mainly because how I had formatted the MIME doc, perhaps).  I will get this simplified.","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"5bab3063133faf6b5f0b3c032b4b5c07f856842e","unresolved":false,"context_lines":[{"line_number":534,"context_line":"                    hundred_continue_headers.append("},{"line_number":535,"context_line":"                        (\u0027X-Obj-Multiphase-Commit\u0027, \u0027yes\u0027))"},{"line_number":536,"context_line":"                    obj_input.set_hundred_continue_response_headers("},{"line_number":537,"context_line":"                        hundred_continue_headers)"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"                if config_true_value("},{"line_number":540,"context_line":"                        request.headers.get(\u0027X-Backend-Obj-Metadata-Footer\u0027)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_ccbc526f","line":537,"updated":"2015-02-18 01:42:05.000000000","message":"so we call this here...","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"5bab3063133faf6b5f0b3c032b4b5c07f856842e","unresolved":false,"context_lines":[{"line_number":542,"context_line":"                    hundred_continue_headers.append("},{"line_number":543,"context_line":"                        (\u0027X-Obj-Metadata-Footer\u0027, \u0027yes\u0027))"},{"line_number":544,"context_line":"                    obj_input.set_hundred_continue_response_headers("},{"line_number":545,"context_line":"                        hundred_continue_headers)"},{"line_number":546,"context_line":"                    mime_boundary \u003d request.headers.get("},{"line_number":547,"context_line":"                        \u0027X-Backend-Obj-Multipart-Mime-Boundary\u0027)"},{"line_number":548,"context_line":"                    if not mime_boundary:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_acb2be46","line":545,"updated":"2015-02-18 01:42:05.000000000","message":"...and then again here? Is calling set_hundred_continue_response_headers() multiple times like this okay? Seems to me like we\u0027ll lose the multiphase-commit header if we hit this line.","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"add65f3c13549bc6b7663389df59a0276a0060ee","unresolved":false,"context_lines":[{"line_number":542,"context_line":"                    hundred_continue_headers.append("},{"line_number":543,"context_line":"                        (\u0027X-Obj-Metadata-Footer\u0027, \u0027yes\u0027))"},{"line_number":544,"context_line":"                    obj_input.set_hundred_continue_response_headers("},{"line_number":545,"context_line":"                        hundred_continue_headers)"},{"line_number":546,"context_line":"                    mime_boundary \u003d request.headers.get("},{"line_number":547,"context_line":"                        \u0027X-Backend-Obj-Multipart-Mime-Boundary\u0027)"},{"line_number":548,"context_line":"                    if not mime_boundary:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_8774f4cf","line":545,"in_reply_to":"da86d52c_acb2be46","updated":"2015-02-18 03:28:28.000000000","message":"\"hundred_continue_headers\" variable is used to store the headers and is updated with obj-metadata-footer header the 2nd time we assign it .. which why this should be ok.\n\nLimitation of the set_hundred_continue_response_headers() API .. I should have added it so we could \"append\" headers .. why I had to use the \"hundred_continue_headers\" variable.\n\nI could have just called set_hundred_continue_response_headers() once outside the 2nd if block, but I hit an issue with trying to set the headers to an empty set .. will take another look.","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e6049e3be3bbea1d48594172feb6a5cc334e8f6f","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                # to indicate that we are finished writing object data"},{"line_number":612,"context_line":"                if use_multiphase_commit:"},{"line_number":613,"context_line":"                    request.environ[\u0027wsgi.input\u0027].\\"},{"line_number":614,"context_line":"                        send_hundred_continue_response()"},{"line_number":615,"context_line":"                    commit_body \u003d self._read_put_commit_message("},{"line_number":616,"context_line":"                        mime_documents_iter)"},{"line_number":617,"context_line":"                    if commit_body.find(\"commit_confirmation\") \u003c 0:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_b54595b5","line":614,"updated":"2015-02-18 11:56:17.000000000","message":"Where is send_hundred_continue_response() defined?","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                    request.environ[\u0027wsgi.input\u0027].\\"},{"line_number":610,"context_line":"                        send_hundred_continue_response()"},{"line_number":611,"context_line":"                    if not self._read_put_commit_message(mime_documents_iter):"},{"line_number":612,"context_line":"                        return HTTPServerError(request\u003drequest)"},{"line_number":613,"context_line":"                    # got 2nd phase confirmation, write a timestamp.durable"},{"line_number":614,"context_line":"                    # state file to indicate a successful PUT"},{"line_number":615,"context_line":"                    try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_1b5eb645","line":612,"updated":"2015-03-02 17:56:55.000000000","message":"missing test coverage, will add trello todo item","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"052384a27df7d76eace24bb119a878ab99dcc451","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                    request.environ[\u0027wsgi.input\u0027].\\"},{"line_number":610,"context_line":"                        send_hundred_continue_response()"},{"line_number":611,"context_line":"                    if not self._read_put_commit_message(mime_documents_iter):"},{"line_number":612,"context_line":"                        return HTTPServerError(request\u003drequest)"},{"line_number":613,"context_line":"                    # got 2nd phase confirmation, write a timestamp.durable"},{"line_number":614,"context_line":"                    # state file to indicate a successful PUT"},{"line_number":615,"context_line":"                    try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_f2dad849","line":612,"in_reply_to":"ba7be1f8_1b5eb645","updated":"2015-03-02 22:09:04.000000000","message":"Hm.. thought I hit this one.  Will take a quick look.","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"5bab3063133faf6b5f0b3c032b4b5c07f856842e","unresolved":false,"context_lines":[{"line_number":1119,"context_line":"        quorum \u003d self._quorum_size(node_count, req)"},{"line_number":1120,"context_line":"        if len(statuses) \u003e\u003d quorum:"},{"line_number":1121,"context_line":"            for hundred in (HTTP_CONTINUE, HTTP_OK, HTTP_MULTIPLE_CHOICES,"},{"line_number":1122,"context_line":"                            HTTP_BAD_REQUEST):"},{"line_number":1123,"context_line":"                if sum(1 for s in statuses"},{"line_number":1124,"context_line":"                       if hundred \u003c\u003d s \u003c hundred + 100) \u003e\u003d quorum:"},{"line_number":1125,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_47967d95","line":1122,"updated":"2015-02-18 01:42:05.000000000","message":"Not your doing, but oh man this line makes me nuts.\n\nWe start off:\n\n    for hundred in (\n\nso now I\u0027m thinking about hundreds, and I\u0027m looking for something like\n    [1, 2, 3] \n\nor \n    [200, 300, 400], \n\n\nbut what do I get? \n\n    [HTTP_CONTINUE, HTTP_OK, HTTP_MULTIPLE_CHOICES, HTTP_BAD_REQUEST].\n\nThose things are all words, but none of them have anything to do with \"hundred\" except that coincidentally their HTTP status codes all end in 00.\n\nDon\u0027t fix it in this patch, though. It\u0027s not necessary to do now; just something that makes my nose wrinkle every time I see it.","commit_id":"059697abd27cc996769f64c64e08fb5068877452"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"add65f3c13549bc6b7663389df59a0276a0060ee","unresolved":false,"context_lines":[{"line_number":1119,"context_line":"        quorum \u003d self._quorum_size(node_count, req)"},{"line_number":1120,"context_line":"        if len(statuses) \u003e\u003d quorum:"},{"line_number":1121,"context_line":"            for hundred in (HTTP_CONTINUE, HTTP_OK, HTTP_MULTIPLE_CHOICES,"},{"line_number":1122,"context_line":"                            HTTP_BAD_REQUEST):"},{"line_number":1123,"context_line":"                if sum(1 for s in statuses"},{"line_number":1124,"context_line":"                       if hundred \u003c\u003d s \u003c hundred + 100) \u003e\u003d quorum:"},{"line_number":1125,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_0af48959","line":1122,"in_reply_to":"da86d52c_47967d95","updated":"2015-02-18 03:28:28.000000000","message":":) Ack.","commit_id":"059697abd27cc996769f64c64e08fb5068877452"}],"swift/proxy/controllers/obj.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"2fa0d34d94daa2231cd232270cd7c6481000b628","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        self.state \u003d COMMIT_SENT"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def set_state(self, state):"},{"line_number":255,"context_line":"        self.state \u003d state"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def _send_file(self, write_timeout, exception_handler):"},{"line_number":258,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_d62593c2","line":255,"updated":"2015-02-12 01:12:45.000000000","message":"I feel like this smells bad. The state transitions were all internal and implicit before, and now we\u0027ve got callers just poking some state into here.","commit_id":"6d0c1cca11ef78cc69b568d75776d592174189d4"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"fca45b3dc6981cd435ced5203138759c05e6f532","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        self.state \u003d COMMIT_SENT"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def set_state(self, state):"},{"line_number":255,"context_line":"        self.state \u003d state"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def _send_file(self, write_timeout, exception_handler):"},{"line_number":258,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_47b64afa","line":255,"in_reply_to":"da86d52c_d62593c2","updated":"2015-02-12 03:54:15.000000000","message":"Hm .. I understand.  Let me see if I can make the states strictly private to the Putter class.","commit_id":"6d0c1cca11ef78cc69b568d75776d592174189d4"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"5bffe9424cbc5977e0bdcc608476f301efb1200d","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        :returns: True or False, depending on current number of successes"},{"line_number":636,"context_line":"        \"\"\""},{"line_number":637,"context_line":"        if len(statuses) \u003e\u003d minimal_count:"},{"line_number":638,"context_line":"            # FIXME is HTTP_OK all we need here?"},{"line_number":639,"context_line":"            for hundred in (HTTP_OK, ):"},{"line_number":640,"context_line":"                if sum(1 for s in statuses"},{"line_number":641,"context_line":"                       if hundred \u003c\u003d s \u003c hundred + 100) \u003e\u003d minimal_count:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_006b611e","line":638,"updated":"2015-02-12 03:50:41.000000000","message":"is_success()","commit_id":"6d0c1cca11ef78cc69b568d75776d592174189d4"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"2fa0d34d94daa2231cd232270cd7c6481000b628","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"                        # a successful PUT"},{"line_number":1137,"context_line":"                        for putter in putters:"},{"line_number":1138,"context_line":"                            putter.set_state(DATA_ACKED)"},{"line_number":1139,"context_line":"                            putter.send_commit_confirmation()"},{"line_number":1140,"context_line":"                    else:"},{"line_number":1141,"context_line":"                        self.app.logger.error("},{"line_number":1142,"context_line":"                            _(\u0027Not enough object servers ack\\\u0027ed (got %d)\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_111ad56e","line":1139,"updated":"2015-02-12 01:12:45.000000000","message":"Yeah, like here, send_commit_confirmation() should be the guy responsible for moving into the DATA_ACKED state, and set_state() can go away. \n\nAlso, then send_commit_confirmation() can ensure that the putter is in the right state and raise an error if it\u0027s not, like the other state-changing methods do.","commit_id":"6d0c1cca11ef78cc69b568d75776d592174189d4"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"fca45b3dc6981cd435ced5203138759c05e6f532","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"                        # a successful PUT"},{"line_number":1137,"context_line":"                        for putter in putters:"},{"line_number":1138,"context_line":"                            putter.set_state(DATA_ACKED)"},{"line_number":1139,"context_line":"                            putter.send_commit_confirmation()"},{"line_number":1140,"context_line":"                    else:"},{"line_number":1141,"context_line":"                        self.app.logger.error("},{"line_number":1142,"context_line":"                            _(\u0027Not enough object servers ack\\\u0027ed (got %d)\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_a7c62666","line":1139,"in_reply_to":"da86d52c_111ad56e","updated":"2015-02-12 03:54:15.000000000","message":"Makes sense.","commit_id":"6d0c1cca11ef78cc69b568d75776d592174189d4"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f957b54a96a2062823bb75d4db7465842e5e7558","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    Probably deserves more docs than this, but meh."},{"line_number":105,"context_line":"    \"\"\""},{"line_number":106,"context_line":"    def __init__(self, conn, node, resp, path, connect_duration, chunked,"},{"line_number":107,"context_line":"                 mime_boundary, need_multiphase_put):"},{"line_number":108,"context_line":"        # Note: you probably want to call Putter.connect() instead of"},{"line_number":109,"context_line":"        # instantiating one of these directly."},{"line_number":110,"context_line":"        self.conn \u003d conn"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_8cb61289","line":107,"updated":"2015-03-02 03:54:03.000000000","message":"in connect (below), need_multiphase_put defaults to False, do we want the same thing here?","commit_id":"364f4c3ae5fc31c651a40a08d726018b2293a7de"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f957b54a96a2062823bb75d4db7465842e5e7558","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        If this Putter was created without need_metadata_footer\u003dTrue, then"},{"line_number":196,"context_line":"        any footer metadata passed in will be silently ignored."},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        :param footer_metadata: dictionary of metadata items"},{"line_number":199,"context_line":"        \"\"\""},{"line_number":200,"context_line":"        if self.state \u003d\u003d DATA_SENT:"},{"line_number":201,"context_line":"            raise ValueError(\"called end_of_object_data twice\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_ac5d967b","line":198,"updated":"2015-03-02 03:54:03.000000000","message":"need_commit_confirmation needs to be added as a param in the doc string","commit_id":"364f4c3ae5fc31c651a40a08d726018b2293a7de"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":212,"context_line":"            footer_body \u003d json.dumps(footer_metadata)"},{"line_number":213,"context_line":"            footer_md5 \u003d md5(footer_body).hexdigest()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"            if need_commit_confirmation:"},{"line_number":216,"context_line":"                tail_boundary \u003d (\"--%s\" % (self.mime_boundary,))"},{"line_number":217,"context_line":"            else:"},{"line_number":218,"context_line":"                tail_boundary \u003d (\"--%s--\" % (self.mime_boundary,))"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_73035cb8","line":215,"updated":"2015-03-02 17:56:55.000000000","message":"this shit is so picky :)","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        confirmations to all object nodes to finalize the PUT."},{"line_number":237,"context_line":"        \"\"\""},{"line_number":238,"context_line":"        if self.state \u003d\u003d COMMIT_SENT:"},{"line_number":239,"context_line":"            raise ValueError(\"called send_commit_confirmation twice\")"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        self.state \u003d DATA_ACKED"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_de6eccc8","line":239,"updated":"2015-03-02 17:56:55.000000000","message":"missing coverage, will add trello item","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        Collect object responses to a PUT request and determine if"},{"line_number":649,"context_line":"        satisfactory number of nodes have returned success.  Return"},{"line_number":650,"context_line":"        statuses, quorum result if indicated by \u0027need_quorum\u0027 and"},{"line_number":651,"context_line":"        etags if this is a final phase or a multiphase PUT transaction."},{"line_number":652,"context_line":"        \"\"\""},{"line_number":653,"context_line":"        statuses \u003d []"},{"line_number":654,"context_line":"        reasons \u003d []"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_852fa787","line":651,"updated":"2015-03-02 17:56:55.000000000","message":"I\u0027m going to add a trello todo item for some minor stuff in here wrt comments, etc., that I think will make it easier to digest for those who weren\u0027t able to listen to any of the code review in person.  This is a pretty complicated function - well to me at least :)","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":693,"context_line":"            if response:"},{"line_number":694,"context_line":"                _handle_response(putter, response)"},{"line_number":695,"context_line":"                if need_quorum and final_phase:"},{"line_number":696,"context_line":"                    # do not declare quorum for 100-continue acks just yet."},{"line_number":697,"context_line":"                    # Wait to collect as many as possible.  Other statuses:"},{"line_number":698,"context_line":"                    # go ahead and declare quorum as soon as we can"},{"line_number":699,"context_line":"                    if self.have_quorum(statuses, len(nodes), req):"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_a5058bc3","line":696,"updated":"2015-03-02 17:56:55.000000000","message":"I don\u0027t know why but this comment still throws me.  Will call it out in the trello todo item as its definitely not worth holding this up over","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"052384a27df7d76eace24bb119a878ab99dcc451","unresolved":false,"context_lines":[{"line_number":693,"context_line":"            if response:"},{"line_number":694,"context_line":"                _handle_response(putter, response)"},{"line_number":695,"context_line":"                if need_quorum and final_phase:"},{"line_number":696,"context_line":"                    # do not declare quorum for 100-continue acks just yet."},{"line_number":697,"context_line":"                    # Wait to collect as many as possible.  Other statuses:"},{"line_number":698,"context_line":"                    # go ahead and declare quorum as soon as we can"},{"line_number":699,"context_line":"                    if self.have_quorum(statuses, len(nodes), req):"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_d27f94de","line":696,"in_reply_to":"ba7be1f8_a5058bc3","updated":"2015-03-02 22:09:04.000000000","message":"I can quickly rephrase this .. didn\u0027t revisit the comment since early revs.  :)","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":703,"context_line":"                    # if quorum is not required (final phase of an erasure"},{"line_number":704,"context_line":"                    # coded PUT, for example), respond to the client after"},{"line_number":705,"context_line":"                    # receiving \u0027min_responses\u0027-lower bound supplied by caller"},{"line_number":706,"context_line":"                    if self._have_adequate_successes(statuses, min_responses):"},{"line_number":707,"context_line":"                        break"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        # give any pending requests *some* chance to finish"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_fecd50b8","line":706,"updated":"2015-03-02 17:56:55.000000000","message":"so I could have sworn I read test code that would have hit this but coverage report is showing no.  Will double check and add trello item if not","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"3ee7d47508c4e2423999daee4448755132b70fe3","unresolved":false,"context_lines":[{"line_number":703,"context_line":"                    # if quorum is not required (final phase of an erasure"},{"line_number":704,"context_line":"                    # coded PUT, for example), respond to the client after"},{"line_number":705,"context_line":"                    # receiving \u0027min_responses\u0027-lower bound supplied by caller"},{"line_number":706,"context_line":"                    if self._have_adequate_successes(statuses, min_responses):"},{"line_number":707,"context_line":"                        break"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        # give any pending requests *some* chance to finish"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_73d987f2","line":706,"in_reply_to":"ba7be1f8_fecd50b8","updated":"2015-03-03 01:17:35.000000000","message":"this is very interesting .. coverage shows the function body itself being covered, but not the (only) call to the function!","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":722,"context_line":"                # intermediate response phase - make sure there is quorum"},{"line_number":723,"context_line":"                # w/ 100-continue acknowledgements"},{"line_number":724,"context_line":"                if self.have_quorum(statuses, len(nodes), req):"},{"line_number":725,"context_line":"                    quorum \u003d True"},{"line_number":726,"context_line":""},{"line_number":727,"context_line":"        return statuses, reasons, bodies, etags, quorum"},{"line_number":728,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_1e4b042c","line":725,"updated":"2015-03-02 17:56:55.000000000","message":"same as prev comment","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"}],"test/unit/obj/test_server.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":4984,"context_line":"        ))"},{"line_number":4985,"context_line":"        to_send \u003d \"%x\\r\\n%s\\r\\n0\\r\\n\\r\\n\" % \\"},{"line_number":4986,"context_line":"            (len(commit_confirmation_doc), commit_confirmation_doc)"},{"line_number":4987,"context_line":"        # verify success (2xx) to make end of phase2"},{"line_number":4988,"context_line":"        conn.send(to_send)"},{"line_number":4989,"context_line":"        resp \u003d conn.getresponse()"},{"line_number":4990,"context_line":"        self.assertEqual(resp.status, 500)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_a879e2fd","line":4987,"updated":"2015-03-02 17:56:55.000000000","message":"verify success?","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"052384a27df7d76eace24bb119a878ab99dcc451","unresolved":false,"context_lines":[{"line_number":4984,"context_line":"        ))"},{"line_number":4985,"context_line":"        to_send \u003d \"%x\\r\\n%s\\r\\n0\\r\\n\\r\\n\" % \\"},{"line_number":4986,"context_line":"            (len(commit_confirmation_doc), commit_confirmation_doc)"},{"line_number":4987,"context_line":"        # verify success (2xx) to make end of phase2"},{"line_number":4988,"context_line":"        conn.send(to_send)"},{"line_number":4989,"context_line":"        resp \u003d conn.getresponse()"},{"line_number":4990,"context_line":"        self.assertEqual(resp.status, 500)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_32555050","line":4987,"in_reply_to":"ba7be1f8_a879e2fd","updated":"2015-03-02 22:09:04.000000000","message":"Good catch.  Copy-paste error.  :)","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"3da7efe7c449acd9a371ebdd24c88e3061777de6","unresolved":false,"context_lines":[{"line_number":1319,"context_line":"                got_pieces.add(contents)"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"                # check presence for a .durable file for the timestamp"},{"line_number":1322,"context_line":"                got_durable.append(df.is_durable())"},{"line_number":1323,"context_line":""},{"line_number":1324,"context_line":"                lmeta \u003d dict((k.lower(), v) for k, v in meta.items())"},{"line_number":1325,"context_line":"                got_indices.add("}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_fb0c823d","line":1322,"updated":"2015-03-02 17:56:55.000000000","message":"just to record what I already mentioned, I think we can just look in the dir here in the test code and not add a df method for this","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"052384a27df7d76eace24bb119a878ab99dcc451","unresolved":false,"context_lines":[{"line_number":1319,"context_line":"                got_pieces.add(contents)"},{"line_number":1320,"context_line":""},{"line_number":1321,"context_line":"                # check presence for a .durable file for the timestamp"},{"line_number":1322,"context_line":"                got_durable.append(df.is_durable())"},{"line_number":1323,"context_line":""},{"line_number":1324,"context_line":"                lmeta \u003d dict((k.lower(), v) for k, v in meta.items())"},{"line_number":1325,"context_line":"                got_indices.add("}],"source_content_type":"text/x-python","patch_set":13,"id":"ba7be1f8_b2bdc06a","line":1322,"in_reply_to":"ba7be1f8_fb0c823d","updated":"2015-03-02 22:09:04.000000000","message":"Okay I was trying to reuse as much stuff from df as possible and hope the is_durable() API would be useful, but no problem - I will remove.","commit_id":"c31a4cca8d15b08039e3e3bab4a9bcdad12430c2"}]}
