)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0c6aa78df814eed300a35b3743050f5f0884c0fe","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"83a70902_84964ca9","updated":"2023-05-19 19:26:24.000000000","message":"Seems obvious in retrospect. Columns have always existed; no upgrade concern (unlike if we wanted to include `tombstones`).","commit_id":"1cfa92a4ba375dee8f6a40d010535d36ccee385a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a2916dc688c7d8bed4af98c94abe417bf31f3203","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2730f970_c8cf953b","updated":"2023-05-19 20:46:22.000000000","message":"Cool, Zuul\u0027s happy -- and I confirmed tests would\u0027ve failed with patchset 1. Query seems to match what we would\u0027ve done before. I\u0027m definitely willing to carry this -- maybe I shouldn\u0027t be quite so merge-happy, though? 😜","commit_id":"776a9d9a121884b2f400ad632c15c9517aab2162"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b0cc93c6fa770f5ab48eed98730e3e91260c4559","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0e49ba92_a9c2c509","updated":"2023-06-13 21:13:52.000000000","message":"We\u0027ve been running with this for a couple weeks; Jian like it; let\u0027s merge it!","commit_id":"776a9d9a121884b2f400ad632c15c9517aab2162"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2b41f8eecf8e3e044850ce266d5f117fb4b09f84","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"8e83f8f8_42db1e8d","updated":"2023-05-19 19:29:27.000000000","message":"i appreciate the encouragement and optimism - but there might still be a little refinement on the query we need to do.","commit_id":"776a9d9a121884b2f400ad632c15c9517aab2162"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ff9d1d50489909ecff062b6a514fe25294962a03","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"df0d19ee_a4348cc6","in_reply_to":"8e83f8f8_42db1e8d","updated":"2023-05-19 19:44:37.000000000","message":"Fair enough 😊","commit_id":"776a9d9a121884b2f400ad632c15c9517aab2162"}],"swift/container/backend.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ff9d1d50489909ecff062b6a514fe25294962a03","unresolved":true,"context_lines":[{"line_number":1944,"context_line":"        \"\"\""},{"line_number":1945,"context_line":"        with self.get() as conn:"},{"line_number":1946,"context_line":"            sql \u003d \u0027\u0027\u0027"},{"line_number":1947,"context_line":"            SELECT COALESCE(SUM(bytes_used), 0),"},{"line_number":1948,"context_line":"                   COALESCE(SUM(object_count), 0)"},{"line_number":1949,"context_line":"            FROM %s"},{"line_number":1950,"context_line":"            WHERE state in (%s)"}],"source_content_type":"text/x-python","patch_set":2,"id":"62e93ee9_9c407103","line":1947,"range":{"start_line":1947,"start_character":32,"end_line":1947,"end_character":42},"updated":"2023-05-19 19:44:37.000000000","message":"We don\u0027t need to worry about *this* being `NULL`, do we? Might want `COALESCE(SUM(COALESCE(bytes_used, 0)), 0)` :barf:","commit_id":"776a9d9a121884b2f400ad632c15c9517aab2162"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b0cc93c6fa770f5ab48eed98730e3e91260c4559","unresolved":false,"context_lines":[{"line_number":1944,"context_line":"        \"\"\""},{"line_number":1945,"context_line":"        with self.get() as conn:"},{"line_number":1946,"context_line":"            sql \u003d \u0027\u0027\u0027"},{"line_number":1947,"context_line":"            SELECT COALESCE(SUM(bytes_used), 0),"},{"line_number":1948,"context_line":"                   COALESCE(SUM(object_count), 0)"},{"line_number":1949,"context_line":"            FROM %s"},{"line_number":1950,"context_line":"            WHERE state in (%s)"}],"source_content_type":"text/x-python","patch_set":2,"id":"0025a02f_abaf6bda","line":1947,"range":{"start_line":1947,"start_character":32,"end_line":1947,"end_character":42},"in_reply_to":"3b567238_0c4fae25","updated":"2023-06-13 21:13:52.000000000","message":"Ack","commit_id":"776a9d9a121884b2f400ad632c15c9517aab2162"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"c8e560c15b0ec92cd6eeb2f9d952dd9d0f3ce941","unresolved":true,"context_lines":[{"line_number":1944,"context_line":"        \"\"\""},{"line_number":1945,"context_line":"        with self.get() as conn:"},{"line_number":1946,"context_line":"            sql \u003d \u0027\u0027\u0027"},{"line_number":1947,"context_line":"            SELECT COALESCE(SUM(bytes_used), 0),"},{"line_number":1948,"context_line":"                   COALESCE(SUM(object_count), 0)"},{"line_number":1949,"context_line":"            FROM %s"},{"line_number":1950,"context_line":"            WHERE state in (%s)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3b567238_0c4fae25","line":1947,"range":{"start_line":1947,"start_character":32,"end_line":1947,"end_character":42},"in_reply_to":"62e93ee9_9c407103","updated":"2023-05-22 18:42:18.000000000","message":"when \"SHARD_RANGE_TABLE\" is created, we use default 0 for them.\nhttps://github.com/openstack/swift/blob/master/swift/container/backend.py#LL650C27-L650C27\nI think the current COALESCE is used for no shard ranges existed in the table, but if there is any one row of shard range, its \"object_count\" or \"bytes_used\" should be 0 or the value caller set. So I think we won\u0027t need COALESCE(bytes_used, 0).","commit_id":"776a9d9a121884b2f400ad632c15c9517aab2162"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ff9d1d50489909ecff062b6a514fe25294962a03","unresolved":false,"context_lines":[{"line_number":1948,"context_line":"                   COALESCE(SUM(object_count), 0)"},{"line_number":1949,"context_line":"            FROM %s"},{"line_number":1950,"context_line":"            WHERE state in (%s)"},{"line_number":1951,"context_line":"              AND deleted \u003d 0"},{"line_number":1952,"context_line":"              AND name !\u003d ?"},{"line_number":1953,"context_line":"            \u0027\u0027\u0027 % (SHARD_RANGE_TABLE, \u0027,\u0027.join(\u0027?\u0027 * len(SHARD_STATS_STATES)))"},{"line_number":1954,"context_line":"            cur \u003d conn.execute(sql, SHARD_STATS_STATES + [self.path])"},{"line_number":1955,"context_line":"            bytes_used, object_count \u003d cur.fetchone()"}],"source_content_type":"text/x-python","patch_set":2,"id":"f5edb6a3_18ef21b9","line":1952,"range":{"start_line":1951,"start_character":14,"end_line":1952,"end_character":27},"updated":"2023-05-19 19:44:37.000000000","message":"Good call.","commit_id":"776a9d9a121884b2f400ad632c15c9517aab2162"}]}
