[TEST] Don't cleanup on watcher side#23
Draft
dragomirp wants to merge 1 commit into
Draft
Conversation
Comment on lines
+284
to
+307
| # try: | ||
| # watcher_addr = f"{member_address}:{port}" | ||
|
|
||
| # # Get the status of the raft cluster. | ||
| # syncobj_util = TcpUtility(password=raft_password, timeout=3) | ||
|
|
||
| # for raft_host in [watcher_addr, *[f"{addr}:{RAFT_PORT}" for addr in partner_addrs]]: | ||
| # if raft_status := syncobj_util.executeCommand(raft_host, ["status"]): | ||
| # # Find all partner nodes in the Raft cluster | ||
| # # Keys look like: partner_node_status_server_10.131.50.142:2222 | ||
| # for key in raft_status: | ||
| # if key.startswith(RAFT_PARTNER_PREFIX) and raft_status[key] != 2: | ||
| # member_addr = key.replace(RAFT_PARTNER_PREFIX, "") | ||
| # member_ip = member_addr.split(":")[0] | ||
|
|
||
| # # Check if this is a stale watcher (not a PostgreSQL node and not current watcher) | ||
| # if member_ip not in partner_addrs and member_addr != member_address: | ||
| # logger.info(f"Removing stale Raft member: {member_addr}") | ||
| # self.remove_raft_member(member_addr, raft_password, []) | ||
| # return True | ||
| # return False | ||
| # except Exception as e: | ||
| # logger.debug(f"Error during Raft cleanup: {e}") | ||
| # return False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Solution
Checklist