Skip to content

Commit 48f8bd4

Browse files
committed
This should fix #7150: Replication not restarting after network failure. Minor adjustments regarding replication startup errors
1 parent 68bcf9a commit 48f8bd4

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/jrd/replication/Config.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ void Config::enumerate(Firebird::Array<Config*>& replicas)
384384
{
385385
config->sourceDirectory = value.c_str();
386386
PathUtils::ensureSeparator(config->sourceDirectory);
387-
checkAccess(config->sourceDirectory, key);
388387
}
389388
else if (key == "source_guid")
390389
{

src/remote/server/os/posix/inet_server.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "../common/config/config.h"
4242
#include "../common/os/fbsyslog.h"
4343
#include "../common/os/os_utils.h"
44+
#include "../common/status.h"
4445
#include <sys/param.h>
4546

4647
#ifdef HAVE_SYS_TYPES_H
@@ -468,15 +469,12 @@ int CLIB_ROUTINE main( int argc, char** argv)
468469

469470
fb_shutdown_callback(NULL, closePort, fb_shut_exit, port);
470471

471-
Firebird::LocalStatus localStatus;
472-
Firebird::CheckStatusWrapper statusWrapper(&localStatus);
473-
474-
if (!REPL_server(&statusWrapper, false, &serverClosing))
472+
Firebird::FbLocalStatus localStatus;
473+
if (!REPL_server(&localStatus, false, &serverClosing))
475474
{
476475
const char* errorMsg = "Replication server initialization error";
477-
gds__log_status(errorMsg, localStatus.getErrors());
476+
iscLogStatus(errorMsg, localStatus->getErrors());
478477
Firebird::Syslog::Record(Firebird::Syslog::Error, errorMsg);
479-
exit(STARTUP_ERROR);
480478
}
481479

482480
SRVR_multi_thread(port, INET_SERVER_flag);

src/remote/server/os/win32/srvr_w32.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,6 @@ static THREAD_ENTRY_DECLARE start_connections_thread(THREAD_ENTRY_PARAM)
501501
*
502502
**************************************/
503503
ThreadCounter counter;
504-
FbLocalStatus localStatus;
505504

506505
if (server_flag & SRVR_inet)
507506
{
@@ -527,7 +526,13 @@ static THREAD_ENTRY_DECLARE start_connections_thread(THREAD_ENTRY_PARAM)
527526
}
528527
}
529528

530-
REPL_server(&localStatus, false, &server_shutdown);
529+
FbLocalStatus localStatus;
530+
if (!REPL_server(&localStatus, false, &server_shutdown))
531+
{
532+
const char* errorMsg = "Replication server initialization error";
533+
iscLogStatus(errorMsg, localStatus->getErrors());
534+
Syslog::Record(Syslog::Error, errorMsg);
535+
}
531536

532537
return 0;
533538
}

0 commit comments

Comments
 (0)