chris cbbrowne at ca.afilias.info
Fri Jul 25 15:25:57 PDT 2008
"Rafael Domiciano" <rafael.domiciano at gmail.com> writes:
> 						      i am doing two cluster differents...
>    my problem is in a set that break in error, because different structure of a table. and then i get that error and everything i do i get the
> 							       message in the log:
> 				       "remoteWorkerThread_1: node -1 not found in runtime configuration"

This error message is generated solely at the start of the function
copy_set(), at the start of a subscription.  It happens when the
search thru node configuration doesn't find the node data in memory,
which presumably takes place because something got confused in memory.

Restarting the slon should resolve the issue.

It should be reasonable to automate this; if the slon's configuration
is mussed up, it might as well die & restart.

Attached is a patch to implement this.

Jan, please review; I'm not sure I have usage of
slon_terminate_worker() correct...

 
Index: remote_worker.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.173
diff -c -u -r1.173 remote_worker.c
--- remote_worker.c	27 Jun 2008 20:16:04 -0000	1.173
+++ remote_worker.c	25 Jul 2008 22:24:40 -0000
@@ -27,8 +27,10 @@
 extern int	STMTS[MAXSTATEMENTS];
 
 #define MAXGROUPSIZE 10000		/* What is the largest number of SYNCs we'd
-								 * want to group together??? */
+					 * want to group together??? */
 
+
+void slon_terminate_worker(void);
 /* ----------
  * Local definitions
  * ----------
@@ -2419,6 +2449,23 @@
 			break;
 		}
 	}
+	if (sub_provider < 0) {
+		rtcfg_unlock();
+		slon_log(SLON_ERROR, "remoteWorkerThread_%d: provider node for set %"
+				 "not found in runtime configuration\n",
+				 set_id);
+		slon_terminate_worker();
+		return -1;
+		
+	}
+	if (set_origin < 0) {
+		rtcfg_unlock();
+		slon_log(SLON_ERROR, "remoteWorkerThread_%d: origin node for set %"
+				 "not found in runtime configuration\n",
+				 set_id);
+		slon_terminate_worker();
+		return -1;
+	}
 	if (set == NULL)
 	{
 		rtcfg_unlock();
@@ -2430,7 +2477,7 @@
 	if ((sub_node = rtcfg_findNode(sub_provider)) == NULL)
 	{
 		rtcfg_unlock();
-		slon_log(SLON_ERROR, "remoteWorkerThread_%d: node %d "
+		slon_log(SLON_ERROR, "remoteWorkerThread_%d: provider node %d "
 				 "not found in runtime configuration\n",
 				 node->no_id, sub_provider);
 		return -1;

Index: slon.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/slon.c,v
retrieving revision 1.77
diff -c -u -r1.77 slon.c
--- slon.c	3 Jan 2008 15:47:21 -0000	1.77
+++ slon.c	25 Jul 2008 22:24:40 -0000
@@ -75,7 +75,7 @@
 #ifndef WIN32
 static void SlonWatchdog(void);
 static void sighandler(int signo);
-static void slon_terminate_worker(void);
+void slon_terminate_worker(void);
 #endif
 
 int			slon_log_level;
@@ -957,7 +957,7 @@
 void
 slon_terminate_worker()
 {
-	slon_log(SLON_DEBUG2, "slon: notify worker process to shutdown\n");
+	slon_log(SLON_INFO, "slon: notify worker process to shutdown\n");
 
 	if (pipewrite(sched_wakeuppipe[1], "p", 1) != 1)
 	{
-- 
select 'cbbrowne' || '@' || 'linuxfinances.info';
http://cbbrowne.com/info/lsf.html
Rules  of the  Evil Overlord  #145. "My  dungeon cell  decor  will not
feature exposed pipes.  While they add to the  gloomy atmosphere, they
are good  conductors of vibrations and  a lot of  prisoners know Morse
code." <http://www.eviloverlord.com/>


More information about the Slony1-general mailing list