)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":39300,"name":"Olessya Khussainova","display_name":"Olessya Khussainova","email":"olessya.khussainova@ps.kz","username":"Cellofun"},"change_message_id":"50718dbe4ec1743e117bf2249ed5f4709cf43b51","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2744d2e6_6aaacbc9","updated":"2026-08-26 12:09:26.000000000","message":"recheck","commit_id":"d184fea9c2176b925b1e4053b0daedd46a5adedd"}],"trove/guestagent/datastore/mysql_common/service.py":[{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"erkin.mussurmankulov@ps.kz","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"27b101c1a411fe190245edcd244c79164e7d6e74","unresolved":true,"context_lines":[{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    def get_replication_health(self):"},{"line_number":823,"context_line":"        \"\"\"Return replica health, or None when this is not a replica.\"\"\""},{"line_number":824,"context_line":"        replica_status \u003d self._get_slave_status()"},{"line_number":825,"context_line":"        if replica_status is None:"},{"line_number":826,"context_line":"            return None"},{"line_number":827,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"b2851b68_c79f2afa","line":824,"updated":"2026-08-25 16:05:26.000000000","message":"I can see that the implementation is working and the code is clean, but there\u0027s an opportunity to make it better.\n\nThe guestagent knows at the instance creation and other replication-related methods that the current instance is a replica, or it stops being a replica. So we can leverage this and avoid repeated checks. I\u0027m concerned that these checks will run against a standalone database instance as well, generating requests to the DB which may be avoided. Also, for replicas, this approach will reduce the number of check requests in half. I think this goal is worth complicating the code a little bit.\nYou can leverage `/etc/trove/guest_info.conf`. Right now, we may use the `override_guest_info` method for that. Also, don\u0027t forget to pass the configuration option during create/rebuild.\n\nAs far as I remember, the original implementation in our fork was doing it that way; it was just buried under the logic behind status classes.\n\nAlso, considering the nontrivial functionality of this feature, I think that we require additional test scenarios dedicated to the `UNSYNC` status; for example, we can extend the existing test after `if not CONF.database.run_full_tests: return` in `replication_test`.","commit_id":"ff35202d076d0209e4c99c51deaf1f2a96e0cccc"},{"author":{"_account_id":39300,"name":"Olessya Khussainova","display_name":"Olessya Khussainova","email":"olessya.khussainova@ps.kz","username":"Cellofun"},"change_message_id":"bb5515da6a8b21597d98c9ea0ecf19213cc5ad92","unresolved":false,"context_lines":[{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    def get_replication_health(self):"},{"line_number":823,"context_line":"        \"\"\"Return replica health, or None when this is not a replica.\"\"\""},{"line_number":824,"context_line":"        replica_status \u003d self._get_slave_status()"},{"line_number":825,"context_line":"        if replica_status is None:"},{"line_number":826,"context_line":"            return None"},{"line_number":827,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"eefeb99c_030eace5","line":824,"in_reply_to":"b2851b68_c79f2afa","updated":"2026-08-26 13:00:52.000000000","message":"Done!\n\nAdded the `is_replica` opt to `guest_info.conf`, its initial value comes from `slave_of_id` during create/rebuild, and the guestagent updates it after successful attach/detach/promote operations.\n\nStandalone instances no longer run replication queries. For thread-based replicas, the replication status query also confirms that the database is responsive, so no additional requests to DB.\n\nI also extended the existing replication scenario in [trove-tempest-plugin](https://review.opendev.org/c/openstack/trove-tempest-plugin/+/1001771). It checks the `UNSYNC` -\u003e `HEALTHY` transition with the first replica, and repeats the check after promotion in the full scenario to make sure the persisted role is updated correctly.","commit_id":"ff35202d076d0209e4c99c51deaf1f2a96e0cccc"}]}
