)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"62bec856614702edaac169ef0025c7fd6cb9d8f1","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Avoid rounding issues for timestamps"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Handling integers as much as possible avoids rounding"},{"line_number":10,"context_line":"for certain calculations."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I6024de69b1f9935ea09f19c4979cc7550d510fee"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9be80499_cec41697","line":10,"updated":"2022-06-22 17:33:58.000000000","message":"This change could really use a test that demonstrates the problem -- I think it boils down to round-tripping, yeah? Like, there should be some float x such that\n\n x \u003d\u003d float(Timestamp(x))\n\nholds for the new code but didn\u0027t with the old, right? Or something with inversions?","commit_id":"32531b1ff8f58de4cc5edb3598dca98c86b5249b"},{"author":{"_account_id":32333,"name":"Aymeric Ducroquetz","email":"aymeric.ducroquetz@gmail.com","username":"AymericDu"},"change_message_id":"8139cdaff1b89f33462a3b855d2b34454a941482","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Avoid rounding issues for timestamps"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Handling integers as much as possible avoids rounding"},{"line_number":10,"context_line":"for certain calculations."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I6024de69b1f9935ea09f19c4979cc7550d510fee"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"641ed415_ad6829ef","line":10,"in_reply_to":"9be80499_cec41697","updated":"2022-06-23 08:39:36.000000000","message":"I will try to do that 👍","commit_id":"32531b1ff8f58de4cc5edb3598dca98c86b5249b"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":32333,"name":"Aymeric Ducroquetz","email":"aymeric.ducroquetz@gmail.com","username":"AymericDu"},"change_message_id":"d91e281945eaa04858ae20efe9a37e55f8d56532","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"03d22c42_58f509fa","updated":"2022-06-20 16:56:20.000000000","message":"With the chosen precision, the inverse is not correct.\n```\n\u003e\u003e\u003e 1 / 1e-5\n99999.99999999999\n```\nAt OVHcloud, precision is in the micro-second.\nAnd we had cases where the version marker was slightly different between what the client sent and the value used for the container.\n","commit_id":"32531b1ff8f58de4cc5edb3598dca98c86b5249b"}],"swift/common/utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"32010619abef26d447f6a070d8f4f211c1552add","unresolved":true,"context_lines":[{"line_number":1229,"context_line":"INTERNAL_FORMAT \u003d NORMAL_FORMAT + \u0027_%016x\u0027"},{"line_number":1230,"context_line":"SHORT_FORMAT \u003d NORMAL_FORMAT + \u0027_%x\u0027"},{"line_number":1231,"context_line":"MAX_OFFSET \u003d (16 ** 16) - 1"},{"line_number":1232,"context_line":"PRECISION \u003d 1e-5"},{"line_number":1233,"context_line":"# To avoid rounding problem, the inverse of the precision should be rounded"},{"line_number":1234,"context_line":"# to the nearest integer."},{"line_number":1235,"context_line":"INV_PRECISION \u003d round(1 / PRECISION)"}],"source_content_type":"text/x-python","patch_set":1,"id":"a5d84e4e_6e34d748","line":1232,"updated":"2022-06-21 18:22:04.000000000","message":"Do we still need the PRECISION constant? Or we should just have\n\n INV_PRECISION \u003d 100000.0\n\nand be done with it?","commit_id":"32531b1ff8f58de4cc5edb3598dca98c86b5249b"},{"author":{"_account_id":32333,"name":"Aymeric Ducroquetz","email":"aymeric.ducroquetz@gmail.com","username":"AymericDu"},"change_message_id":"32e7585c8c7fc6fc2b4592e17412cb0e222975da","unresolved":true,"context_lines":[{"line_number":1229,"context_line":"INTERNAL_FORMAT \u003d NORMAL_FORMAT + \u0027_%016x\u0027"},{"line_number":1230,"context_line":"SHORT_FORMAT \u003d NORMAL_FORMAT + \u0027_%x\u0027"},{"line_number":1231,"context_line":"MAX_OFFSET \u003d (16 ** 16) - 1"},{"line_number":1232,"context_line":"PRECISION \u003d 1e-5"},{"line_number":1233,"context_line":"# To avoid rounding problem, the inverse of the precision should be rounded"},{"line_number":1234,"context_line":"# to the nearest integer."},{"line_number":1235,"context_line":"INV_PRECISION \u003d round(1 / PRECISION)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bbfc17ba_d5724c53","line":1232,"in_reply_to":"a5d84e4e_6e34d748","updated":"2022-06-22 11:53:25.000000000","message":"I agree that this constant is only used to calculate the inverse.\nBut I kept it to easily know the precision (more readable).\nLet me know if you\u0027d rather I take it off.","commit_id":"32531b1ff8f58de4cc5edb3598dca98c86b5249b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"32010619abef26d447f6a070d8f4f211c1552add","unresolved":true,"context_lines":[{"line_number":1231,"context_line":"MAX_OFFSET \u003d (16 ** 16) - 1"},{"line_number":1232,"context_line":"PRECISION \u003d 1e-5"},{"line_number":1233,"context_line":"# To avoid rounding problem, the inverse of the precision should be rounded"},{"line_number":1234,"context_line":"# to the nearest integer."},{"line_number":1235,"context_line":"INV_PRECISION \u003d round(1 / PRECISION)"},{"line_number":1236,"context_line":"MAX_RAW_TIMESTAMP \u003d (10000000000 * INV_PRECISION) - 1"},{"line_number":1237,"context_line":"# Setting this to True will cause the internal format to always display"}],"source_content_type":"text/x-python","patch_set":1,"id":"1de22ae3_540714d1","line":1234,"updated":"2022-06-21 18:22:04.000000000","message":"\u003e.\u003c\n\n $ for p in python2.7 python3.4 python3.5 python3.6 python3.7 python3.8 python3.9 python3.10 ; do $p -c \"print(1/1e-5)\" ; done\n 100000.0\n 99999.99999999999\n 99999.99999999999\n 99999.99999999999\n 99999.99999999999\n 99999.99999999999\n 99999.99999999999\n 99999.99999999999","commit_id":"32531b1ff8f58de4cc5edb3598dca98c86b5249b"},{"author":{"_account_id":32333,"name":"Aymeric Ducroquetz","email":"aymeric.ducroquetz@gmail.com","username":"AymericDu"},"change_message_id":"32e7585c8c7fc6fc2b4592e17412cb0e222975da","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"MAX_OFFSET \u003d (16 ** 16) - 1"},{"line_number":1232,"context_line":"PRECISION \u003d 1e-5"},{"line_number":1233,"context_line":"# To avoid rounding problem, the inverse of the precision should be rounded"},{"line_number":1234,"context_line":"# to the nearest integer."},{"line_number":1235,"context_line":"INV_PRECISION \u003d round(1 / PRECISION)"},{"line_number":1236,"context_line":"MAX_RAW_TIMESTAMP \u003d (10000000000 * INV_PRECISION) - 1"},{"line_number":1237,"context_line":"# Setting this to True will cause the internal format to always display"}],"source_content_type":"text/x-python","patch_set":1,"id":"f63a811a_38cd823d","line":1234,"in_reply_to":"1de22ae3_540714d1","updated":"2022-06-22 11:53:25.000000000","message":"I hadn\u0027t tested so many different versions, but that\u0027s good to know.","commit_id":"32531b1ff8f58de4cc5edb3598dca98c86b5249b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"62bec856614702edaac169ef0025c7fd6cb9d8f1","unresolved":true,"context_lines":[{"line_number":1322,"context_line":"            if self.raw \u003c\u003d 0:"},{"line_number":1323,"context_line":"                raise ValueError("},{"line_number":1324,"context_line":"                    \u0027delta must be greater than %d\u0027 % (-1 * self.raw))"},{"line_number":1325,"context_line":"            self.timestamp \u003d float(self.raw / INV_PRECISION)"},{"line_number":1326,"context_line":"        if check_bounds:"},{"line_number":1327,"context_line":"            if self.timestamp \u003c 0:"},{"line_number":1328,"context_line":"                raise ValueError(\u0027timestamp cannot be negative\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"79ceca79_025eab0d","line":1325,"updated":"2022-06-22 17:33:58.000000000","message":"I need to brush up on my numerical analysis -- it\u0027s not clear to me that this actually improves the situation.\n\nMaybe we\u0027d be better off using https://docs.python.org/3/library/decimal.html for all this?","commit_id":"32531b1ff8f58de4cc5edb3598dca98c86b5249b"}]}
