)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c2bc1cbcebd91d22c321ddabd37959af1ae36cee","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Make all debug and info level logs that are associated with a"},{"line_number":10,"context_line":"ContainerBroker include the path to the DB file and the namespace path"},{"line_number":11,"context_line":"to the container."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I7d2fe064175f002055054a72f348b87dc396772b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"469a8733_deaa43d7","line":11,"updated":"2023-02-24 20:20:24.000000000","message":"yeah if just did this (include device path and account/container) this would probably be fine\n\nI think Tim is right to raise concern about running methods/queries every debug message","commit_id":"9d875497750a1121e8fe9a956c86ece23b016ab7"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c2bc1cbcebd91d22c321ddabd37959af1ae36cee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ac3a1050_a7852be5","updated":"2023-02-24 20:20:24.000000000","message":"idk, let\u0027s get the plumbing in with minimum viable attributes and then we can debate about expanding the context with more (cached) attributes/info","commit_id":"9d875497750a1121e8fe9a956c86ece23b016ab7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a4212dc8e613ff93f1d76c1e78dbf432f2eba5f0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e6b54504_05175141","updated":"2023-02-27 15:25:45.000000000","message":"ok, I reined in the scope","commit_id":"7001a9278d4b5f013b3b8f2195966a5e6b48f95a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"22d9adddcda74bfaa4f2db9b7daf598a1234275c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"64b413c3_82b0c0f9","updated":"2023-02-28 21:41:04.000000000","message":"neither of these patches are terribly big - did you split them up just to minimize size?  If we want to do it - we probably want to go all in.","commit_id":"f26bbe43cedc417405ed29c758ebb81b87f3e160"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b8ea63fa8f63e305ff4474f68ae7269a23bb7fd7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"23d0a0f6_e150f8de","in_reply_to":"64b413c3_82b0c0f9","updated":"2023-03-01 13:10:02.000000000","message":"I wondered if there might be resistance to changing warning/error logs that ops might be scraping for alerts. I was going to raise awareness of the change at an #openstack-swift meeting. Otherwise I\u0027d be very happy to squash it all together. @Tim has noticed that there has been some bleed through between the two patches as I have made revisions.","commit_id":"f26bbe43cedc417405ed29c758ebb81b87f3e160"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d6dc91396e2e5e6c55ae5c09e6484e4b19913ed4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9ae27204_583a90ba","updated":"2023-03-02 06:03:41.000000000","message":"recheck\n\nlolwut\n\n 2023-03-02 01:59:26.860 | Killed by signal 15.\n\n...and then it all falls apart.","commit_id":"8814cde6813f92abee5f2285789e86caaac781f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"dd47a3a3f3c93202b64a9c722cbc4db5aa44aea9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c3bd5bb0_564867c6","updated":"2023-03-01 21:55:52.000000000","message":"squashed in the warning and error level changes","commit_id":"8814cde6813f92abee5f2285789e86caaac781f3"}],"swift/container/sharder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dee8ebc0235c275d5087941f43fd50b74522c1e5","unresolved":false,"context_lines":[{"line_number":912,"context_line":"        db_file_index \u003d kwargs.get(\u0027db_file_index\u0027, -1)"},{"line_number":913,"context_line":"        func(\u0027%s, path: %s, db: %s, db_state: %s, deleted: %s\u0027,"},{"line_number":914,"context_line":"             msg % args,"},{"line_number":915,"context_line":"             quote(broker.path),"},{"line_number":916,"context_line":"             broker.db_files[db_file_index],"},{"line_number":917,"context_line":"             broker.get_db_state(),"},{"line_number":918,"context_line":"             broker.is_deleted())"}],"source_content_type":"text/x-python","patch_set":1,"id":"f63176e4_ddae6c46","line":915,"range":{"start_line":915,"start_character":13,"end_line":915,"end_character":18},"updated":"2023-02-24 17:22:09.000000000","message":"+1","commit_id":"9d875497750a1121e8fe9a956c86ece23b016ab7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dee8ebc0235c275d5087941f43fd50b74522c1e5","unresolved":true,"context_lines":[{"line_number":915,"context_line":"             quote(broker.path),"},{"line_number":916,"context_line":"             broker.db_files[db_file_index],"},{"line_number":917,"context_line":"             broker.get_db_state(),"},{"line_number":918,"context_line":"             broker.is_deleted())"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"    def debug(self, broker, msg, *args, **kwargs):"},{"line_number":921,"context_line":"        self._log(self.logger.debug, broker, msg, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"02a843fe_630001d0","line":918,"range":{"start_line":918,"start_character":20,"end_line":918,"end_character":30},"updated":"2023-02-24 17:22:09.000000000","message":"This is heavier weight than the other stuff we\u0027re adding -- we sure we want to try to take out locks so we can clear out pending files on *every* debug/info message?\n\nI\u0027d feel better about it if we did something like\n\n old_val \u003d broker.skip_commits\n try:\n     broker.skip_commits \u003d True\n     func(...)\n finally:\n     broker.skip_commits \u003d old_val\n\nEven with that, we might want to include a LBYL check that the configured log level would mean we\u0027d actually write the message -- no sense running the queries to determine the value of the arg when we\u0027re just going to drop it on the floor.","commit_id":"9d875497750a1121e8fe9a956c86ece23b016ab7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a427c6a1e16cd9582d7ef471816c91fcef8f4cbe","unresolved":true,"context_lines":[{"line_number":915,"context_line":"             quote(broker.path),"},{"line_number":916,"context_line":"             broker.db_files[db_file_index],"},{"line_number":917,"context_line":"             broker.get_db_state(),"},{"line_number":918,"context_line":"             broker.is_deleted())"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"    def debug(self, broker, msg, *args, **kwargs):"},{"line_number":921,"context_line":"        self._log(self.logger.debug, broker, msg, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f088be3_f8cffad4","line":918,"range":{"start_line":918,"start_character":20,"end_line":918,"end_character":30},"in_reply_to":"02a843fe_630001d0","updated":"2023-02-24 18:33:19.000000000","message":"Oh -- one more thought: what should happen if there\u0027s an error during any of these operations?\n\nYou\u0027d hope that by the time we\u0027re logging anything about it, the instance cache would be populated, so `.path` is hopefully fine? `.db_files[db_file_index]` could conceivably raise an `IndexError`, though, whether due to caller error or the file getting deleted between walking the disks to find the file and calling `reload_db_files()` in the broker. Both `get_db_state()` and `is_deleted()` run queries which could time out or otherwise fail...","commit_id":"9d875497750a1121e8fe9a956c86ece23b016ab7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"dd47a3a3f3c93202b64a9c722cbc4db5aa44aea9","unresolved":false,"context_lines":[{"line_number":915,"context_line":"             quote(broker.path),"},{"line_number":916,"context_line":"             broker.db_files[db_file_index],"},{"line_number":917,"context_line":"             broker.get_db_state(),"},{"line_number":918,"context_line":"             broker.is_deleted())"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"    def debug(self, broker, msg, *args, **kwargs):"},{"line_number":921,"context_line":"        self._log(self.logger.debug, broker, msg, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"82f6bd4f_06e68b2a","line":918,"range":{"start_line":918,"start_character":20,"end_line":918,"end_character":30},"in_reply_to":"1f088be3_f8cffad4","updated":"2023-03-01 21:55:52.000000000","message":"Done","commit_id":"9d875497750a1121e8fe9a956c86ece23b016ab7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dee8ebc0235c275d5087941f43fd50b74522c1e5","unresolved":true,"context_lines":[{"line_number":1983,"context_line":"                [{\u0027sync_point\u0027: source_max_row, \u0027remote_id\u0027: source_db_id}] +"},{"line_number":1984,"context_line":"                source_broker.get_syncs())"},{"line_number":1985,"context_line":"        else:"},{"line_number":1986,"context_line":"            self.debug(broker, \"Cleaving: %r - shard db already in sync\","},{"line_number":1987,"context_line":"                       shard_range)"},{"line_number":1988,"context_line":""},{"line_number":1989,"context_line":"        replication_quorum \u003d self.existing_shard_replication_quorum"}],"source_content_type":"text/x-python","patch_set":1,"id":"48e05207_6d4d467b","line":1986,"updated":"2023-02-24 17:22:09.000000000","message":"nit: Feels a little odd that we kept the colon here but dropped it just above.","commit_id":"9d875497750a1121e8fe9a956c86ece23b016ab7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a4212dc8e613ff93f1d76c1e78dbf432f2eba5f0","unresolved":false,"context_lines":[{"line_number":1983,"context_line":"                [{\u0027sync_point\u0027: source_max_row, \u0027remote_id\u0027: source_db_id}] +"},{"line_number":1984,"context_line":"                source_broker.get_syncs())"},{"line_number":1985,"context_line":"        else:"},{"line_number":1986,"context_line":"            self.debug(broker, \"Cleaving: %r - shard db already in sync\","},{"line_number":1987,"context_line":"                       shard_range)"},{"line_number":1988,"context_line":""},{"line_number":1989,"context_line":"        replication_quorum \u003d self.existing_shard_replication_quorum"}],"source_content_type":"text/x-python","patch_set":1,"id":"33b4def5_587249d3","line":1986,"in_reply_to":"48e05207_6d4d467b","updated":"2023-02-27 15:25:45.000000000","message":"Done","commit_id":"9d875497750a1121e8fe9a956c86ece23b016ab7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"da9b2abc61014281cf123dcbfe9966afe93c291a","unresolved":true,"context_lines":[{"line_number":915,"context_line":""},{"line_number":916,"context_line":"        # make best effort to include broker properties..."},{"line_number":917,"context_line":"        try:"},{"line_number":918,"context_line":"            db_file \u003d broker.db_file"},{"line_number":919,"context_line":"        except Exception:  # noqa"},{"line_number":920,"context_line":"            db_file \u003d \u0027\u0027"},{"line_number":921,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"0d340650_145d4fc1","line":918,"range":{"start_line":918,"start_character":29,"end_line":918,"end_character":36},"updated":"2023-03-01 23:10:34.000000000","message":"FWIW, I\u0027m actually *much* more confident about using `.db_file` -- https://github.com/openstack/swift/blob/2.31.0/swift/container/backend.py#L500-L515 seems pretty bullet-proof about returning *something* rather than raising an error.","commit_id":"f26bbe43cedc417405ed29c758ebb81b87f3e160"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"11b030848b750f3c0d9e5c888eef8231b1aeb32c","unresolved":true,"context_lines":[{"line_number":925,"context_line":"        return \u0027%s, path: %s, db: %s\u0027 % (msg, quote(path), db_file)"},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def _log(self, level, broker, msg, *args):"},{"line_number":928,"context_line":"        if not self.logger.isEnabledFor(level):"},{"line_number":929,"context_line":"            return"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"        self.logger.log(level, self._format_log_msg(broker, msg, *args))"}],"source_content_type":"text/x-python","patch_set":5,"id":"fccdd800_40864d34","line":928,"updated":"2023-03-02 05:12:17.000000000","message":"Just curious, why checking it here? Typically the users of logging aren\u0027t expected to do this. Does it save some RAM or..?","commit_id":"8814cde6813f92abee5f2285789e86caaac781f3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5e2029f84ce9133cb969f6389a17ab4bef6ad4c8","unresolved":true,"context_lines":[{"line_number":925,"context_line":"        return \u0027%s, path: %s, db: %s\u0027 % (msg, quote(path), db_file)"},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def _log(self, level, broker, msg, *args):"},{"line_number":928,"context_line":"        if not self.logger.isEnabledFor(level):"},{"line_number":929,"context_line":"            return"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"        self.logger.log(level, self._format_log_msg(broker, msg, *args))"}],"source_content_type":"text/x-python","patch_set":5,"id":"2d82a3ee_e1459066","line":928,"in_reply_to":"fccdd800_40864d34","updated":"2023-03-02 17:08:49.000000000","message":"In the normal chain of logging, the string would not be formatted until isEnabledFor has been checked. I\u0027m checking isEnabledFor early because I\u0027m doing some formatting early. It\u0027s a small optimisation.","commit_id":"8814cde6813f92abee5f2285789e86caaac781f3"}]}
