8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:03:02 +01:00

This should fix #7150: Replication not restarting after network failure. Minor adjustments regarding replication startup errors

This commit is contained in:
Dmitry Yemanov 2022-03-08 13:33:30 +03:00
parent 68bcf9abd5
commit 48f8bd4a9d
3 changed files with 11 additions and 9 deletions

View File

@ -384,7 +384,6 @@ void Config::enumerate(Firebird::Array<Config*>& replicas)
{
config->sourceDirectory = value.c_str();
PathUtils::ensureSeparator(config->sourceDirectory);
checkAccess(config->sourceDirectory, key);
}
else if (key == "source_guid")
{

View File

@ -41,6 +41,7 @@
#include "../common/config/config.h"
#include "../common/os/fbsyslog.h"
#include "../common/os/os_utils.h"
#include "../common/status.h"
#include <sys/param.h>
#ifdef HAVE_SYS_TYPES_H
@ -468,15 +469,12 @@ int CLIB_ROUTINE main( int argc, char** argv)
fb_shutdown_callback(NULL, closePort, fb_shut_exit, port);
Firebird::LocalStatus localStatus;
Firebird::CheckStatusWrapper statusWrapper(&localStatus);
if (!REPL_server(&statusWrapper, false, &serverClosing))
Firebird::FbLocalStatus localStatus;
if (!REPL_server(&localStatus, false, &serverClosing))
{
const char* errorMsg = "Replication server initialization error";
gds__log_status(errorMsg, localStatus.getErrors());
iscLogStatus(errorMsg, localStatus->getErrors());
Firebird::Syslog::Record(Firebird::Syslog::Error, errorMsg);
exit(STARTUP_ERROR);
}
SRVR_multi_thread(port, INET_SERVER_flag);

View File

@ -501,7 +501,6 @@ static THREAD_ENTRY_DECLARE start_connections_thread(THREAD_ENTRY_PARAM)
*
**************************************/
ThreadCounter counter;
FbLocalStatus localStatus;
if (server_flag & SRVR_inet)
{
@ -527,7 +526,13 @@ static THREAD_ENTRY_DECLARE start_connections_thread(THREAD_ENTRY_PARAM)
}
}
REPL_server(&localStatus, false, &server_shutdown);
FbLocalStatus localStatus;
if (!REPL_server(&localStatus, false, &server_shutdown))
{
const char* errorMsg = "Replication server initialization error";
iscLogStatus(errorMsg, localStatus->getErrors());
Syslog::Record(Syslog::Error, errorMsg);
}
return 0;
}