)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"cba728900e13313573867c599a8077237d5a8427","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"257bc077_421c1d4d","updated":"2025-12-24 12:50:50.000000000","message":"recheck","commit_id":"9366678a9e5c5725b67927175d9f56ffbe6a2060"}],"swift/common/middleware/versioned_writes/legacy.py":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"619d9fdd40c58920370ac87f2ee8b32d8e76eace","unresolved":true,"context_lines":[{"line_number":512,"context_line":""},{"line_number":513,"context_line":"        marker_path \u003d \"/%s/%s/%s/%s\" % ("},{"line_number":514,"context_line":"            api_version, account_name, versions_cont,"},{"line_number":515,"context_line":"            self._build_versions_object_name(object_name, Timestamp.now()))"},{"line_number":516,"context_line":"        marker_headers \u003d {"},{"line_number":517,"context_line":"            # Definitive source of truth is Content-Type, and since we add"},{"line_number":518,"context_line":"            # a swift_* param, we know users haven\u0027t set it themselves."}],"source_content_type":"text/x-python","patch_set":9,"id":"e44d57b8_8f60ca7f","line":515,"updated":"2025-12-23 07:10:37.000000000","message":"the title of this patch is ``Tests: ...``, but it actually changes production code. But the change seems only for test cases, since ``_build_versions_object_name`` will convert the timestamp into a Timestamp object as well.\n\n```\n    def _build_versions_object_name(self, object_name, ts):\n        return \u0027\u0027.join((\n            self._build_versions_object_prefix(object_name),\n            Timestamp(ts).internal))\n```\n\nbut I do have a question regarding the change of ``marker_path`` with the incoming version 2 Timestamp, do we want the ``marker_path`` to have the jitter in the path? and if yes, will versioned writes middleware will be able to process both old v1 and new v2 ``marker_path``?","commit_id":"bb4196971880a84f35c7898d40ac7af9dfa0d747"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a686740a65484b4a86b33b3820b3404113f6bedb","unresolved":true,"context_lines":[{"line_number":512,"context_line":""},{"line_number":513,"context_line":"        marker_path \u003d \"/%s/%s/%s/%s\" % ("},{"line_number":514,"context_line":"            api_version, account_name, versions_cont,"},{"line_number":515,"context_line":"            self._build_versions_object_name(object_name, Timestamp.now()))"},{"line_number":516,"context_line":"        marker_headers \u003d {"},{"line_number":517,"context_line":"            # Definitive source of truth is Content-Type, and since we add"},{"line_number":518,"context_line":"            # a swift_* param, we know users haven\u0027t set it themselves."}],"source_content_type":"text/x-python","patch_set":9,"id":"35fb7c9f_809df083","line":515,"in_reply_to":"e44d57b8_8f60ca7f","updated":"2025-12-23 11:39:09.000000000","message":"fair point about the commit message. I\u0027ll change that but also break the patch into two so there is a clear separation of the test changes for object_versioning vs legacy middlewares.\n\nHowever, as you saw, there isn\u0027t actually any behaviour change.\n\nRe. having jitter in the delete marker name, I think we do want it because we could have two concurrent delete requests that would hit the same deca-microsecond time window.\n\nI\u0027m not sure why the delete marker name uses time.time() and doesn\u0027t use the timestamp of the DELETE request (which the more modern object_versioning middleware does). \n\nThere\u0027s also the oddity that the copy of the current object to the versions container uses the response x-timestamp which has the less precise (in future jitterless-) normal format. I think we probably want to change that to use x-backend-timestamp.\n\nSo there is a lot to be careful about in these middlewares when we finally introduce jitter :/","commit_id":"bb4196971880a84f35c7898d40ac7af9dfa0d747"}],"test/unit/common/middleware/test_versioned_writes.py":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"a930fa18ff3e2502d711a59a14cbfe199add43e4","unresolved":true,"context_lines":[{"line_number":1478,"context_line":"             \u0027last-modified\u0027: date_header_format(ts_then)},"},{"line_number":1479,"context_line":"            \u0027passed\u0027)"},{"line_number":1480,"context_line":"        self.app.register("},{"line_number":1481,"context_line":"            \u0027PUT\u0027, \u0027/v1/a/ver_cont/007tgt_obj/%s\u0027 % ts_now.normal, swob.HTTPOk,"},{"line_number":1482,"context_line":"            {}, None)"},{"line_number":1483,"context_line":"        self.app.register("},{"line_number":1484,"context_line":"            \u0027PUT\u0027, \u0027/v1/a/tgt_cont/tgt_obj\u0027, swob.HTTPCreated, {}, \u0027passed\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"b1777933_19377e6f","line":1481,"updated":"2026-01-08 00:57:07.000000000","message":"I thought this is a bug: this test uses the legacy VersionedWritesMiddleware, so the path should use ``ts_now.internal`` instead of ``ts_now.normal``.\n\nThen I saw how ``_build_versions_object_name`` is called in the copy path.\n```\n        # if there\u0027s an existing object, then copy it to\n        # X-Versions-Location\n        ts_source \u003d get_resp.headers.get(\n            \u0027x-timestamp\u0027,\n            calendar.timegm(time.strptime(\n                get_resp.headers[\u0027last-modified\u0027],\n                DATE_HEADER_FORMAT_STRING)))\n        vers_obj_name \u003d self._build_versions_object_name(\n            object_name, ts_source)\n```\nsince ``\u0027x-timestamp\u0027`` uses ``ts_now.normal`` in the setup, so ``_build_versions_object_name`` still will use ``ts_now.normal`` even though internally it does the conversion.","commit_id":"9366678a9e5c5725b67927175d9f56ffbe6a2060"}]}
