)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"dade529aeb696d8a54dfdd4a3e0d2b4e10697197","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch fixes those failures by ensuring that sysmeta is written"},{"line_number":16,"context_line":"and/or updated on a POST to the object server. It takes the approach"},{"line_number":17,"context_line":"outlined here:"},{"line_number":18,"context_line":"https://wiki.openstack.org/wiki/Swift/ObjectSystemMetadata"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Namely, the original sysmeta in the .data file xattrs is left alone,"},{"line_number":21,"context_line":"and updates/new sysmeta are done to the .meta files."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da6ed579_9c859eae","line":18,"updated":"2016-01-13 10:56:30.000000000","message":"IMHO this patch does not implement the approach described on that wiki page, which describes using multiple .meta files to persist potentially inconsistent metadata form concurrent POSTs","commit_id":"e94b131a3e5d6b994c8d26fdb69f4ea925a61164"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"fc5e685dcf4844b8712993f808a7f13afdab4db7","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch fixes those failures by ensuring that sysmeta is written"},{"line_number":16,"context_line":"and/or updated on a POST to the object server. It takes the approach"},{"line_number":17,"context_line":"outlined here:"},{"line_number":18,"context_line":"https://wiki.openstack.org/wiki/Swift/ObjectSystemMetadata"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Namely, the original sysmeta in the .data file xattrs is left alone,"},{"line_number":21,"context_line":"and updates/new sysmeta are done to the .meta files."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da6ed579_3ea6d310","line":18,"in_reply_to":"da6ed579_9c859eae","updated":"2016-01-13 16:33:04.000000000","message":"My understanding is that the use of multiple .meta files (and merging them) would be the fix for the timing issue/inconsistency? \n\nShould I address that issue in this patch, or as part of the Trello card here:\nhttps://trello.com/c/pX9DzWL9\n\n(Please forgive me if I\u0027m confusing these issues)","commit_id":"e94b131a3e5d6b994c8d26fdb69f4ea925a61164"}],"swift/obj/diskfile.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"748392b194ed5c5ad0157f67989c92d260167678","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# These are system-set metadata keys that cannot be changed with a POST."},{"line_number":78,"context_line":"# They should be lowercase."},{"line_number":79,"context_line":"DATAFILE_SYSTEM_META \u003d set([\u0027content-length\u0027, \u0027content-type\u0027, \u0027deleted\u0027,"},{"line_number":80,"context_line":"                            \u0027etag\u0027, \u0027x-object-sysmeta-ec-frag-index\u0027])"},{"line_number":81,"context_line":"DATADIR_BASE \u003d \u0027objects\u0027"},{"line_number":82,"context_line":"ASYNCDIR_BASE \u003d \u0027async_pending\u0027"},{"line_number":83,"context_line":"TMP_BASE \u003d \u0027tmp\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_2459b38e","line":80,"updated":"2016-02-18 15:37:20.000000000","message":"OIC that\u0027s cool - you override the sysmeta updating for the ec-frag-index key.","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"65db8b9b400647a577d1338a7c029d0905963e71","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# These are system-set metadata keys that cannot be changed with a POST."},{"line_number":78,"context_line":"# They should be lowercase."},{"line_number":79,"context_line":"DATAFILE_SYSTEM_META \u003d set([\u0027content-length\u0027, \u0027content-type\u0027, \u0027deleted\u0027,"},{"line_number":80,"context_line":"                            \u0027etag\u0027, \u0027x-object-sysmeta-ec-frag-index\u0027])"},{"line_number":81,"context_line":"DATADIR_BASE \u003d \u0027objects\u0027"},{"line_number":82,"context_line":"ASYNCDIR_BASE \u003d \u0027async_pending\u0027"},{"line_number":83,"context_line":"TMP_BASE \u003d \u0027tmp\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_56c320ed","line":80,"in_reply_to":"dae33548_2459b38e","updated":"2016-02-29 12:59:46.000000000","message":"this seems weird and leaky - is something shadowing this sysmeta value on a subsequent POST?  Why aren\u0027t the dozens of other sysmeta values effected?","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"748392b194ed5c5ad0157f67989c92d260167678","unresolved":false,"context_lines":[{"line_number":1733,"context_line":""},{"line_number":1734,"context_line":"            sys_metadata_datafile \u003d dict("},{"line_number":1735,"context_line":"                [(key, val) for key, val in self._datafile_metadata.items()"},{"line_number":1736,"context_line":"                 if key.lower() in DATAFILE_SYSTEM_META"},{"line_number":1737,"context_line":"                 or is_sys_meta(\u0027object\u0027, key)])"},{"line_number":1738,"context_line":""},{"line_number":1739,"context_line":"            # 1) Start with original sysmeta in .data file."}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_c4d8c755","line":1736,"updated":"2016-02-18 15:37:20.000000000","message":"not strictly necessary to include DATAFILE_SYSTEM_META in this dict since you update with meta_immutable_datafile at line 1746","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"b89eceda480d0c285e049d078ea4b61268d42dc6","unresolved":false,"context_lines":[{"line_number":1733,"context_line":""},{"line_number":1734,"context_line":"            sys_metadata_datafile \u003d dict("},{"line_number":1735,"context_line":"                [(key, val) for key, val in self._datafile_metadata.items()"},{"line_number":1736,"context_line":"                 if key.lower() in DATAFILE_SYSTEM_META"},{"line_number":1737,"context_line":"                 or is_sys_meta(\u0027object\u0027, key)])"},{"line_number":1738,"context_line":""},{"line_number":1739,"context_line":"            # 1) Start with original sysmeta in .data file."}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_ef866d12","line":1736,"in_reply_to":"dae33548_c4d8c755","updated":"2016-02-19 10:33:07.000000000","message":"Nice catch! Will make the change; it will also better reflect the name `sys_metadata_datafile`.","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"ad13afa90bc16fbf31e5579e8523d89e56133128","unresolved":false,"context_lines":[{"line_number":1735,"context_line":"                [(key, val) for key, val in self._datafile_metadata.items()"},{"line_number":1736,"context_line":"                 if key.lower() in DATAFILE_SYSTEM_META"},{"line_number":1737,"context_line":"                 or is_sys_meta(\u0027object\u0027, key)])"},{"line_number":1738,"context_line":""},{"line_number":1739,"context_line":"            # 1) Start with original sysmeta in .data file."},{"line_number":1740,"context_line":"            # 2) Override/update with all metadata {sys, user} from"},{"line_number":1741,"context_line":"            # .meta file."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_d3c70d62","line":1738,"updated":"2016-02-01 15:31:53.000000000","message":"Alistair: I believe this logic is correct, let me know if I\u0027ve misunderstood something.","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"748392b194ed5c5ad0157f67989c92d260167678","unresolved":false,"context_lines":[{"line_number":1735,"context_line":"                [(key, val) for key, val in self._datafile_metadata.items()"},{"line_number":1736,"context_line":"                 if key.lower() in DATAFILE_SYSTEM_META"},{"line_number":1737,"context_line":"                 or is_sys_meta(\u0027object\u0027, key)])"},{"line_number":1738,"context_line":""},{"line_number":1739,"context_line":"            # 1) Start with original sysmeta in .data file."},{"line_number":1740,"context_line":"            # 2) Override/update with all metadata {sys, user} from"},{"line_number":1741,"context_line":"            # .meta file."}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_a4f023ca","line":1738,"in_reply_to":"7a5de9d1_d3c70d62","updated":"2016-02-18 15:37:20.000000000","message":"Yep i think you have it correct! +1 for the comments too!","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"65db8b9b400647a577d1338a7c029d0905963e71","unresolved":false,"context_lines":[{"line_number":1740,"context_line":"            # 2) Override/update with all metadata {sys, user} from"},{"line_number":1741,"context_line":"            # .meta file."},{"line_number":1742,"context_line":"            # 3) Override/update with DATAFILE_SYSTEM_META metadata from"},{"line_number":1743,"context_line":"            # .data file."},{"line_number":1744,"context_line":"            self._metadata.update(sys_metadata_datafile)"},{"line_number":1745,"context_line":"            self._metadata.update(self._metafile_metadata)"},{"line_number":1746,"context_line":"            self._metadata.update(meta_immutable_datafile)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_3605bc13","line":1743,"updated":"2016-02-29 12:59:46.000000000","message":"I thought content-type\u0027s might be in .meta files  - why is step 3 needed - why can\u0027t you just start with .data and if meta: remove user meta and apply .meta file updates?","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"}],"swift/obj/server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"76ccfc19d238e8a89103fad81c9962eb0f31887c","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        # https://wiki.openstack.org/wiki/Swift/ObjectSystemMetadata"},{"line_number":501,"context_line":"        metadata.update(val for val in request.headers.items()"},{"line_number":502,"context_line":"                        if is_sys_or_user_meta(\u0027object\u0027, val[0]))"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"        headers_to_copy \u003d ("},{"line_number":505,"context_line":"            request.headers.get("},{"line_number":506,"context_line":"                \u0027X-Backend-Replication-Headers\u0027, \u0027\u0027).split() +"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_9989fe77","line":503,"updated":"2016-01-22 14:46:19.000000000","message":"this is necessary but not sufficient, the test additions in my diff reveal that more is needed.\n\nyou also need to change diskfile._construct_from_data_file so that the existing data file sysmeta items are not written over the meta file metadata","commit_id":"c14ac59e2670833b1ac5d884877839fde9f482c3"}],"test/unit/obj/test_diskfile.py":[{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"ad13afa90bc16fbf31e5579e8523d89e56133128","unresolved":false,"context_lines":[{"line_number":3597,"context_line":"        actual \u003d df.get_metadata().get(\u0027X-Object-Sysmeta-Ec-Frag-Index\u0027)"},{"line_number":3598,"context_line":"        self.assertEqual(int(orig_frag_index), int(actual))"},{"line_number":3599,"context_line":""},{"line_number":3600,"context_line":"        # attempt to overwrite frag index sysmeta"},{"line_number":3601,"context_line":"        # NOTE: The updated value for \u0027X-Object-Sysmeta-Ec-Frag-Index\u0027 is"},{"line_number":3602,"context_line":"        # not included in the returned metadata due to its entry in"},{"line_number":3603,"context_line":"        # diskfile.DATAFILE_SYSTEM_META"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_73adf999","line":3600,"updated":"2016-02-01 15:31:53.000000000","message":"Unsure whether this is the correct way to accomplish this after the fast-POST changes.","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"748392b194ed5c5ad0157f67989c92d260167678","unresolved":false,"context_lines":[{"line_number":3597,"context_line":"        actual \u003d df.get_metadata().get(\u0027X-Object-Sysmeta-Ec-Frag-Index\u0027)"},{"line_number":3598,"context_line":"        self.assertEqual(int(orig_frag_index), int(actual))"},{"line_number":3599,"context_line":""},{"line_number":3600,"context_line":"        # attempt to overwrite frag index sysmeta"},{"line_number":3601,"context_line":"        # NOTE: The updated value for \u0027X-Object-Sysmeta-Ec-Frag-Index\u0027 is"},{"line_number":3602,"context_line":"        # not included in the returned metadata due to its entry in"},{"line_number":3603,"context_line":"        # diskfile.DATAFILE_SYSTEM_META"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_84dfdfd4","line":3600,"in_reply_to":"7a5de9d1_73adf999","updated":"2016-02-18 15:37:20.000000000","message":"at first glance this seems to work - i.e. including X-Object-Sysmeta-Ec-Frag-Index\u0027 in diskfile.DATAFILE_SYSTEM_META","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"}],"test/unit/obj/test_server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"dade529aeb696d8a54dfdd4a3e0d2b4e10697197","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"                          \u0027name\u0027: \u0027/a/c/o\u0027,"},{"line_number":1213,"context_line":"                          \u0027X-Object-Meta-1\u0027: \u0027Not One\u0027,"},{"line_number":1214,"context_line":"                          \u0027X-Object-Sysmeta-1\u0027: \u0027Changed One\u0027,"},{"line_number":1215,"context_line":"                          \u0027X-Object-Sysmeta-Two\u0027: \u0027Changed Two\u0027})"},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"    def test_PUT_then_fetch_system_metadata(self):"},{"line_number":1218,"context_line":"        timestamp \u003d normalize_timestamp(time())"}],"source_content_type":"text/x-python","patch_set":1,"id":"da6ed579_3c4fd2be","line":1215,"updated":"2016-01-13 10:56:30.000000000","message":"It would be useful to add another phase to this test:\n\n  - perform another POST with no sysmeta headers\n  - open the diskfile\n  - verify diskfile.metadata\n  - in this case I would expect to find the original sysmeta values set with the first PUT request","commit_id":"e94b131a3e5d6b994c8d26fdb69f4ea925a61164"},{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"fc5e685dcf4844b8712993f808a7f13afdab4db7","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"                          \u0027name\u0027: \u0027/a/c/o\u0027,"},{"line_number":1213,"context_line":"                          \u0027X-Object-Meta-1\u0027: \u0027Not One\u0027,"},{"line_number":1214,"context_line":"                          \u0027X-Object-Sysmeta-1\u0027: \u0027Changed One\u0027,"},{"line_number":1215,"context_line":"                          \u0027X-Object-Sysmeta-Two\u0027: \u0027Changed Two\u0027})"},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"    def test_PUT_then_fetch_system_metadata(self):"},{"line_number":1218,"context_line":"        timestamp \u003d normalize_timestamp(time())"}],"source_content_type":"text/x-python","patch_set":1,"id":"da6ed579_3ef493f0","line":1215,"in_reply_to":"da6ed579_3c4fd2be","updated":"2016-01-13 16:33:04.000000000","message":"Agreed, will add.","commit_id":"e94b131a3e5d6b994c8d26fdb69f4ea925a61164"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"76ccfc19d238e8a89103fad81c9962eb0f31887c","unresolved":false,"context_lines":[{"line_number":1251,"context_line":"                          \u0027name\u0027: \u0027/a/c/o\u0027,"},{"line_number":1252,"context_line":"                          \u0027X-Object-Meta-1\u0027: \u0027Not One\u0027,"},{"line_number":1253,"context_line":"                          \u0027X-Object-Sysmeta-1\u0027: \u0027Changed One\u0027,"},{"line_number":1254,"context_line":"                          \u0027X-Object-Sysmeta-Two\u0027: \u0027Changed Two\u0027})"},{"line_number":1255,"context_line":""},{"line_number":1256,"context_line":"    def test_PUT_then_fetch_system_metadata(self):"},{"line_number":1257,"context_line":"        timestamp \u003d normalize_timestamp(time())"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_7665391c","line":1254,"updated":"2016-01-22 14:46:19.000000000","message":"after this, make a POST with no sysmeta headers, then you should see the original data file sysmeta in the HEAD response (which is the issue we need to work around).\n\nSee my diff on gisthub","commit_id":"c14ac59e2670833b1ac5d884877839fde9f482c3"}],"test/unit/proxy/test_sysmeta.py":[{"author":{"_account_id":18820,"name":"Peter Chng","email":"pchng@ca.ibm.com","username":"pchng"},"change_message_id":"ad13afa90bc16fbf31e5579e8523d89e56133128","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        req \u003d Request.blank(path, environ\u003d{})"},{"line_number":264,"context_line":"        resp \u003d req.get_response(self.app)"},{"line_number":265,"context_line":"        self._assertStatus(resp, 200)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        # TODO: Unsure how to handle this. With the current changes:"},{"line_number":268,"context_line":"        # - Fast-POST updates AND adds new sysmeta."},{"line_number":269,"context_line":"        # - post_as_copy only adds NEW sysmeta."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_53dc7d45","line":266,"updated":"2016-02-01 15:31:53.000000000","message":"There\u0027s currently one more UT failing because of this: test_sysmeta_updated_by_POST (test.unit.proxy.test_sysmeta.TestObjectSysmeta)\n\nI\u0027m not sure whether the post_as_copy behaviour should be updated to match the new fast-POST behaviour, i.e. adding new AND updating existing sysmeta.","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"748392b194ed5c5ad0157f67989c92d260167678","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        req \u003d Request.blank(path, environ\u003d{})"},{"line_number":264,"context_line":"        resp \u003d req.get_response(self.app)"},{"line_number":265,"context_line":"        self._assertStatus(resp, 200)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        # TODO: Unsure how to handle this. With the current changes:"},{"line_number":268,"context_line":"        # - Fast-POST updates AND adds new sysmeta."},{"line_number":269,"context_line":"        # - post_as_copy only adds NEW sysmeta."}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_040e2f8b","line":266,"in_reply_to":"7a5de9d1_53dc7d45","updated":"2016-02-18 15:37:20.000000000","message":"sigh...yes, post-as-copy behavior will also need to change to copy all sysmeta during a POST","commit_id":"07e0ac897dba05314f21e5605a57a79ddb9656e1"}]}
