Spotted while reviewing #795, one line above the swallow that PR removes.
FileChangelogDB.initializeDB()
(opendj-server-legacy/src/main/java/org/opends/server/replication/server/changelog/file/FileChangelogDB.java:282-300)
catches ChangelogException and only logs ERR_COULD_NOT_READ_DB:
public void initializeDB()
{
try
{
replicationEnv = new ReplicationEnvironment(dbDirectory.getAbsolutePath(), replicationServer, TimeService.SYSTEM);
...
}
catch (ChangelogException e)
{
logger.traceException(e);
logger.error(ERR_COULD_NOT_READ_DB, this.dbDirectory.getAbsolutePath(), e.getLocalizedMessage());
}
}
ReplicationServer.initialize() calls it and then goes on to bind the listen port and start its
threads, so a replication server whose changelog cannot be read comes up and accepts
connections: the failure surfaces later, somewhere else — the exact shape #792 / #795 removed
for the listen port.
Why it was not fixed in #795
Propagating it means adding throws ChangelogException (or wrapping it in a ConfigException)
to the ChangelogDB interface and to every implementation and caller, which is a change of its
own.
What to do
Decide whether an unreadable changelog must prevent the replication server from starting — as
an unbindable listen port now does — and, if so, propagate the exception through ChangelogDB.
Spotted while reviewing #795, one line above the swallow that PR removes.
FileChangelogDB.initializeDB()(
opendj-server-legacy/src/main/java/org/opends/server/replication/server/changelog/file/FileChangelogDB.java:282-300)catches
ChangelogExceptionand only logsERR_COULD_NOT_READ_DB:ReplicationServer.initialize()calls it and then goes on to bind the listen port and start itsthreads, so a replication server whose changelog cannot be read comes up and accepts
connections: the failure surfaces later, somewhere else — the exact shape #792 / #795 removed
for the listen port.
Why it was not fixed in #795
Propagating it means adding
throws ChangelogException(or wrapping it in aConfigException)to the
ChangelogDBinterface and to every implementation and caller, which is a change of itsown.
What to do
Decide whether an unreadable changelog must prevent the replication server from starting — as
an unbindable listen port now does — and, if so, propagate the exception through
ChangelogDB.