)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"a106c7672b56ee15875ecc1de0accf5a289ede00","unresolved":true,"context_lines":[{"line_number":12,"context_line":"the at the exact same time and in the case of EC this can get"},{"line_number":13,"context_line":"interesting."},{"line_number":14,"context_line":"There is a solution to this datetime collision in distributed systems"},{"line_number":15,"context_line":"and its called a lampart clock. Basically keeping track of an extra"},{"line_number":16,"context_line":"counter so we can deal with time collisions."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Because our Timestamp class already supports the ability to not just"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"c683834e_604cb33f","line":15,"range":{"start_line":15,"start_character":17,"end_line":15,"end_character":24},"updated":"2025-09-15 13:00:56.000000000","message":"lamport - typo","commit_id":"343f80fdb77f91c24159dff62756492383a07ccb"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"deba53c5666ebad95596e4611c4c568b7f10d90c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e0e031d0_93956804","updated":"2025-09-05 05:15:12.000000000","message":"Its nice that after you run the time collision probe tests:\n```\nvagrant@saio4:~/swift$ pytest test/probe/test_timestamp_collision.py\n```\n\nYou can check the state of the data on disk and see why the last one failed was because there are 2 full sets of frags because they don\u0027t collide anymore:\n```\nvagrant@saio4:~/swift$ find /srv/ -name *.data\n/srv/node2/sdb2/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321f2c4b0#3.data\n/srv/node2/sdb2/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321555cb0#3#d.data\n/srv/node3/sdb3/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321f2c4b0#5.data\n/srv/node3/sdb3/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321555cb0#5#d.data\n/srv/node3/sdb7/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321f2c4b0#1.data\n/srv/node3/sdb7/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321555cb0#1#d.data\n/srv/node1/sdb1/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321f2c4b0#2.data\n/srv/node1/sdb1/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321555cb0#2#d.data\n/srv/node4/sdb8/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321f2c4b0#4.data\n/srv/node4/sdb8/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321555cb0#4#d.data\n/srv/node4/sdb4/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321f2c4b0#0.data\n/srv/node4/sdb4/objects-1/960/889/f02df5ca8360360525554fbee37a1889/1757046907.82399_0001ff5321555cb0#0#d.data\n```\n\nAlso note they all end with a 0 in the offset now, this is so you can easily spot if the reconiler has run and done a simple offset increment.","commit_id":"87e2a0462c4782299bc927c0a7e0f589814910b4"}],"swift/common/utils/timestamp.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"57348de6a0804bc454aa2a11ffe0541f2f3e0236","unresolved":true,"context_lines":[{"line_number":253,"context_line":"        inv_timestamp \u003d (999999999999999 - self.raw) * PRECISION"},{"line_number":254,"context_line":"        inv_offset \u003d 0"},{"line_number":255,"context_line":"        if self.offset:"},{"line_number":256,"context_line":"            inv_offset \u003d (16**16 - 1) - self.offset"},{"line_number":257,"context_line":"        return Timestamp(inv_timestamp, inv_offset)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7774b7fd_10b349fe","line":256,"updated":"2025-11-19 18:38:14.000000000","message":"don\u0027t we need to always invert offset even when it\u0027s zero?","commit_id":"410bb21f7299c5c811da3b9a34f18d7330909241"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b8ddf2a60e9ef29decc833de3169d6128e229a6a","unresolved":true,"context_lines":[{"line_number":1951,"context_line":"        if orig_req and transfer:"},{"line_number":1952,"context_line":"            # transfer headers from orig_req can override additional headers"},{"line_number":1953,"context_line":"            self.transfer_headers(orig_req.headers, headers)"},{"line_number":1954,"context_line":"        headers.setdefault(\u0027x-timestamp\u0027, Timestamp.now().internal)"},{"line_number":1955,"context_line":"        # orig_req and additional headers cannot override the following..."},{"line_number":1956,"context_line":"        headers[\u0027x-trans-id\u0027] \u003d self.trans_id"},{"line_number":1957,"context_line":"        headers[\u0027connection\u0027] \u003d \u0027close\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"7d4171a4_281f8b79","line":1954,"updated":"2025-09-18 20:28:46.000000000","message":"Might want to move the delta up here, where we\u0027re already messing with `x-timestamp`","commit_id":"59cc10f0c681cc280f6982fcd7d8730d721e9638"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"11cd2b44a98f603faf8e142b129afd37b7edc53e","unresolved":false,"context_lines":[{"line_number":1951,"context_line":"        if orig_req and transfer:"},{"line_number":1952,"context_line":"            # transfer headers from orig_req can override additional headers"},{"line_number":1953,"context_line":"            self.transfer_headers(orig_req.headers, headers)"},{"line_number":1954,"context_line":"        headers.setdefault(\u0027x-timestamp\u0027, Timestamp.now().internal)"},{"line_number":1955,"context_line":"        # orig_req and additional headers cannot override the following..."},{"line_number":1956,"context_line":"        headers[\u0027x-trans-id\u0027] \u003d self.trans_id"},{"line_number":1957,"context_line":"        headers[\u0027connection\u0027] \u003d \u0027close\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"4cbe2087_44827c2a","line":1954,"in_reply_to":"7d4171a4_281f8b79","updated":"2025-09-19 05:17:53.000000000","message":"Done","commit_id":"59cc10f0c681cc280f6982fcd7d8730d721e9638"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b8ddf2a60e9ef29decc833de3169d6128e229a6a","unresolved":true,"context_lines":[{"line_number":1963,"context_line":"            # Also we need to update the proxy number in x-timestamp\u0027s offset"},{"line_number":1964,"context_line":"            unique_offset \u003d self.app.proxy_number"},{"line_number":1965,"context_line":"            if eventlet.getcurrent():"},{"line_number":1966,"context_line":"                unique_offset +\u003d id(eventlet.getcurrent())"},{"line_number":1967,"context_line":"            # Now we bitshift to the left by 4 bits so we get a 0 on the end"},{"line_number":1968,"context_line":"            # of any data files. So we can still easily see reconciler or"},{"line_number":1969,"context_line":"            # whatever increments."}],"source_content_type":"text/x-python","patch_set":6,"id":"3d2e4730_07bf35bc","line":1966,"updated":"2025-09-18 20:28:46.000000000","message":"We should always be in a greenthread, right? So we should always be combining with the greenthread id... I\u0027m starting to wonder how much benefit we get from this vs. just\n```\nunique_offset \u003d random.randint(0, 2**16 - 1)\n```\nThen we don\u0027t need any new config plumbing.","commit_id":"59cc10f0c681cc280f6982fcd7d8730d721e9638"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"52625d78afa452abf3ca134000676aaa6966796d","unresolved":true,"context_lines":[{"line_number":1963,"context_line":"            # Also we need to update the proxy number in x-timestamp\u0027s offset"},{"line_number":1964,"context_line":"            unique_offset \u003d self.app.proxy_number"},{"line_number":1965,"context_line":"            if eventlet.getcurrent():"},{"line_number":1966,"context_line":"                unique_offset +\u003d id(eventlet.getcurrent())"},{"line_number":1967,"context_line":"            # Now we bitshift to the left by 4 bits so we get a 0 on the end"},{"line_number":1968,"context_line":"            # of any data files. So we can still easily see reconciler or"},{"line_number":1969,"context_line":"            # whatever increments."}],"source_content_type":"text/x-python","patch_set":6,"id":"d8eef3f2_0dd5fea7","line":1966,"in_reply_to":"3d2e4730_07bf35bc","updated":"2025-09-18 20:57:30.000000000","message":"Oh! Or! We could even pull it out of (part of) the body IV used for encryption...\n\nBut maybe that\u0027s going too far. I suppose we don\u0027t really want to require that the proxy-server app know about encryption details like that...","commit_id":"59cc10f0c681cc280f6982fcd7d8730d721e9638"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"872cd6d933d7bd55443191b268a43439a604edd7","unresolved":true,"context_lines":[{"line_number":1963,"context_line":"            # Also we need to update the proxy number in x-timestamp\u0027s offset"},{"line_number":1964,"context_line":"            unique_offset \u003d self.app.proxy_number"},{"line_number":1965,"context_line":"            if eventlet.getcurrent():"},{"line_number":1966,"context_line":"                unique_offset +\u003d id(eventlet.getcurrent())"},{"line_number":1967,"context_line":"            # Now we bitshift to the left by 4 bits so we get a 0 on the end"},{"line_number":1968,"context_line":"            # of any data files. So we can still easily see reconciler or"},{"line_number":1969,"context_line":"            # whatever increments."}],"source_content_type":"text/x-python","patch_set":6,"id":"a03bac5c_d66e3984","line":1966,"in_reply_to":"4c9dea7c_06e63faf","updated":"2025-09-25 14:24:21.000000000","message":"I also wondered about just going random. The txn id has both a random part AND the proxy host (or at least can have) but it\u0027s too big to fit into offset (and not an int!).\n\nI took a stab at adding a separate attribute to the Timestamp for a uid. This has the benefit of (a) not constraining what the size and type of the uid can be, (b) not conflicting at all with the existing use of offset.\n\nSee https://review.opendev.org/c/openstack/swift/+/962275?usp\u003demail\n\nSo far it\u0027s not terrible: diskfile and ssync just worked!","commit_id":"59cc10f0c681cc280f6982fcd7d8730d721e9638"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"11cd2b44a98f603faf8e142b129afd37b7edc53e","unresolved":true,"context_lines":[{"line_number":1963,"context_line":"            # Also we need to update the proxy number in x-timestamp\u0027s offset"},{"line_number":1964,"context_line":"            unique_offset \u003d self.app.proxy_number"},{"line_number":1965,"context_line":"            if eventlet.getcurrent():"},{"line_number":1966,"context_line":"                unique_offset +\u003d id(eventlet.getcurrent())"},{"line_number":1967,"context_line":"            # Now we bitshift to the left by 4 bits so we get a 0 on the end"},{"line_number":1968,"context_line":"            # of any data files. So we can still easily see reconciler or"},{"line_number":1969,"context_line":"            # whatever increments."}],"source_content_type":"text/x-python","patch_set":6,"id":"4c9dea7c_06e63faf","line":1966,"in_reply_to":"d8eef3f2_0dd5fea7","updated":"2025-09-19 05:17:53.000000000","message":"yeah, I did originally think just randint might be enough.. but there is a small chance another proxy gets the same. uuid.getnode just seems like a cute way of geting something unique for each node because it should be based on a hardware address.\n\nBut randint for just eventlet uniqueness is kind of an interesting idea (and less of big number). BUT it would need to be calculated for each request as we build the controller for the request. So id() should be more effiecient as that\u0027s dertermined at greenthread creation time (I suspect).\n\nI also decided to do the `eventlet.getcurrent()` incase we ever stop using eventlet, so eanted to gaurd for that.. but I guess in that case we wont be importing eventlet anymore. Byt that\u0027s","commit_id":"59cc10f0c681cc280f6982fcd7d8730d721e9638"}],"swift/proxy/server.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"02c7d663824d80a6e1c9649385777757093b3242","unresolved":true,"context_lines":[{"line_number":355,"context_line":"            self.proxy_number \u003d config_auto_int_value("},{"line_number":356,"context_line":"                proxy_number, randint(0, constraints.MAX_PROXY_NUMBER))"},{"line_number":357,"context_line":"        # add the pid, so each worker is unique"},{"line_number":358,"context_line":"        self.proxy_number +\u003d os.getpid()"},{"line_number":359,"context_line":"        self.logger.info("},{"line_number":360,"context_line":"            f\u0027Unique proxy number (proxy_number): {self.proxy_number}\u0027)"},{"line_number":361,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"6ff719b5_0a05a9da","line":358,"updated":"2025-09-04 06:45:35.000000000","message":"Adding the pid here is a little random.. as the idea of adding the PID is to differentiate from other workers.. put this here assuming workers forking happens earlier back at the run_server although the pipeline has probably already been built. So I probably have to move this.","commit_id":"ac5b9fe501d1054688f0084ada1a6e1c1cbc7cd5"}]}
