Skip to content

Commit c95f8cd

Browse files
author
vogelor
committed
fixed a bug in replication
1 parent 8d06004 commit c95f8cd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

server/lib/classes/modules.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ function registerTableHook($table_name,$module_name,$function_name) {
8282
function processDatalog() {
8383
global $app,$conf;
8484

85-
// TODO: process only new entries.
8685
//* If its a multiserver setup
8786
if($app->db->dbHost != $app->dbmaster->dbHost) {
8887
$sql = "SELECT * FROM sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]." OR server_id = 0) ORDER BY datalog_id";
@@ -151,7 +150,12 @@ function processDatalog() {
151150
$app->dbmaster->query("UPDATE server SET updated = ".$d["datalog_id"]." WHERE server_id = ".$conf["server_id"]);
152151
$app->log("Processed datalog_id ".$d["datalog_id"],LOGLEVEL_DEBUG);
153152
} else {
154-
$app->log("Error in Repliction, changes were not processed.",LOGLEVEL_ERROR);
153+
$app->log("Error in Replication, changes were not processed.",LOGLEVEL_ERROR);
154+
/*
155+
* If there is any error in processing the datalog we can't continue, because
156+
* we do not know if the newer actions require this (old) one.
157+
*/
158+
return;
155159
}
156160
}
157161

0 commit comments

Comments
 (0)