Skip to content

Mark server failed after its logs have been deleted by a peer #31226

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

Open
wants to merge 1 commit into
base: integration
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2995,7 +2995,8 @@ private void markFailed(Throwable t, boolean report, boolean peerServerLostLogOw
boolean newFailure = false;
synchronized (this) {
if (!_failed) {
if (tc.isDebugEnabled()) Tr.debug(tc, "markFailed: RecoveryLog has been marked as failed. [" + this + "]");
if (tc.isDebugEnabled())
Tr.debug(tc, "markFailed: RecoveryLog has been marked as failed. [" + this + "]");
newFailure = true;
_failed = true;
}
Expand Down Expand Up @@ -3848,12 +3849,17 @@ public void heartBeat() throws LogClosedException {
if (tc.isDebugEnabled())
Tr.debug(tc, "The underlying table may have been deleted");
if (isTableDeleted(sqlex)) {
// The underlying table has been deleted
Tr.audit(tc, "WTRN0107W: " +
"Underlying SQL tables missing when heartbeating SQL RecoveryLog " + _logName + " for server " + _serverName);
// Set exception variables to NOT retry
// Set exception variables to NOT retry. Regular heartbeat will keep going
currentSqlEx = null;
nonTransientException = sqlex;
if (conn != null) {
// At this point we know we can contact the database and we know our log table has disappeared. A peer server must have recovered our logs.
// We'll mark the log failed so the server will go down unless configured not to.
markFailed(sqlex, true, false);
} else {
Tr.audit(tc, "WTRN0107W: " +
"Underlying SQL tables missing when heartbeating SQL RecoveryLog " + _logName + " for server " + _serverName);
}
} else
Tr.audit(tc, "WTRN0107W: " +
"Peer locking heartbeat failed with SQL exception: " + sqlex);
Expand Down