Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More debug messages for failover #33

Merged
merged 1 commit into from
Aug 29, 2024
Merged

More debug messages for failover #33

merged 1 commit into from
Aug 29, 2024

Conversation

munakoiso
Copy link
Contributor

I caught a failed switchover test.
Check successful switchover with a dead primary and autofailover = and, quorum_commit = no.
Here is the election log
Host2:

2024-08-29 05:57:58,752 DEBUG:	No lock instance for enter_election. Creating one.
2024-08-29 05:57:58,760 INFO:	Changing election status to: cleanup
2024-08-29 05:57:58,765 DEBUG:	Manage election
2024-08-29 05:57:58,767 DEBUG:	HA hosts are: ['pgconsul_postgresql1_1.pgconsul_pgconsul_net', 'pgconsul_postgresql2_1.pgconsul_pgconsul_net', 'pgconsul_postgresql3_1.pgconsul_pgconsul_net']
2024-08-29 05:57:58,768 INFO:	Changing election status to: registration
2024-08-29 05:58:08,785 INFO:	Changing election status to: selection
2024-08-29 05:58:08,789 DEBUG:	HA hosts are: ['pgconsul_postgresql1_1.pgconsul_pgconsul_net', 'pgconsul_postgresql2_1.pgconsul_pgconsul_net', 'pgconsul_postgresql3_1.pgconsul_pgconsul_net']
2024-08-29 05:58:08,790 ERROR:	Failed to get 'pgconsul_postgresql2_1.pgconsul_pgconsul_net' lsn for elections.
2024-08-29 05:58:08,790 ERROR:	Failed to get 'pgconsul_postgresql3_1.pgconsul_pgconsul_net' lsn for elections.
2024-08-29 05:58:08,791 INFO:	Collected votes are: {}
2024-08-29 05:58:08,791 ERROR:	Not enough votes for quorum.

Host3:

2024-08-29 05:57:58,810 DEBUG:	No lock instance for enter_election. Creating one.
2024-08-29 05:57:58,819 DEBUG:	Participate in election
2024-08-29 05:57:58,828 INFO:	Waiting 1 for election status done
2024-08-29 05:57:59,830 INFO:	Waiting 1.1661394208107576 for election status done

Definitely, it's a bug. I think the lsn is none, but I'm not sure. If we add more debug messages, we can find the problem when the test fails again.

@munakoiso munakoiso requested a review from a team as a code owner August 29, 2024 08:59
@reshke reshke merged commit f230314 into yandex:main Aug 29, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants