[
https://forge.continuent.org/jira/browse/SEQUOIA-910?page=comments#action_13698
]
Guillaume Smet commented on SEQUOIA-910:
----------------------------------------
Hi again,
IMHO the stack trace was not complete. Here is what happens with PostgreSQL:
21:47:01,714 ERROR sequoia.controller.recoverylog Failed to log update test set
message='6' where message='plop'
org.postgresql.util.PSQLException: FATAL: terminating connection due to
administrator command
at
org.postgresql.core.v2.QueryExecutorImpl.receiveErrorMessage(QueryExecutorImpl.java:557)
at
org.postgresql.core.v2.QueryExecutorImpl.processResults(QueryExecutorImpl.java:480)
at
org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:364)
at
org.postgresql.core.v2.QueryExecutorImpl.execute(QueryExecutorImpl.java:258)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:308)
at
org.continuent.sequoia.controller.recoverylog.events.LogRequestEvent.execute(LogRequestEvent.java:102)
at
org.continuent.sequoia.controller.recoverylog.LoggerThread.run(LoggerThread.java:732)
21:47:01,721 ERROR sequoia.controller.recoverylog Failed to log update test set
message='6' where message='plop'
java.sql.SQLException: Failed to get connection
(org.postgresql.util.PSQLException: Connection refused. Check that the hostname
and port are correct and that the postmaster is accepting TCP/IP connections.)
at
org.continuent.sequoia.controller.recoverylog.RecoveryLog.getDatabaseConnection(RecoveryLog.java:336)
at
org.continuent.sequoia.controller.recoverylog.LoggerThread.getLogPreparedStatement(LoggerThread.java:114)
at
org.continuent.sequoia.controller.recoverylog.events.LogRequestEvent.execute(LogRequestEvent.java:75)
at
org.continuent.sequoia.controller.recoverylog.LoggerThread.run(LoggerThread.java:732)
21:47:01,721 ERROR sequoia.controller.recoverylog WARNING! Your recovery log is
probably corrupted, you should perform a restore log operation
So a recovery log corruption is detected but Sequoia doesn't do anything in
this case apart from logging the problem.
Is it possible to invalidate the controller because if there are queries not
logged in the recovery log, it's impossible to guarantee the consistency of the
backends after a restore/enable?
I was thinking of adding a isCorrupted boolean in RecoveryLog and set it to
false in LoggerThread when a failure is detected and set it to true again if
the recovery log is initialized or restored.
Then we could add a new sanity check to
RequestManager.enableBackendFromCheckpoint
Thoughts?
--
Guillaume
> Undetected recovery log failure causes a major problem in replication
> ---------------------------------------------------------------------
>
> Key: SEQUOIA-910
> URL: https://forge.continuent.org/jira/browse/SEQUOIA-910
> Project: Sequoia
> Type: Bug
> Components: Core
> Versions: Sequoia 3.0
> Reporter: Guillaume Smet
>
>
> This is a followup of the thread
> https://forge.continuent.org/pipermail/sequoia/2007-February/004683.html on
> sequoia list.
> In RecoveryLog.getDatabaseConnection(), Sequoia catches RuntimeException and
> SQLException but not others. In the case of RuntimeException and
> SQLException, a problem to establish the connection is correctly handled
> (inserts in the recovery log are postponed) but not in the case of a
> ConnectException for instance.
> In the case reported by Gérard Bunel, the MySQL server hosting the recovery
> log is shutdown and it throws a java.net.ConnectException. Write queries are
> not logged in this recovery log and the failure of the recovery log is not
> detected by Sequoia. This leads to a synchronisation problem when restarting
> the recovery log and enabling the backend as the recovery logs of both
> controllers are not identical.
> IMHO we should catch every Exception instead of just SQLException in the last
> catch of getDatabaseConnection().
> Thoughts?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia