CVS User Account cvsuser
Thu May 4 07:42:51 PDT 2006
Log Message:
-----------
Use constant MAXGROUPSIZE rather than 10000 to handle the max # of SYNCs
to be grouped together.

Modified Files:
--------------
    slony1-engine/src/slon:
        remote_worker.c (r1.112 -> r1.113)

-------------- next part --------------
Index: remote_worker.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -Lsrc/slon/remote_worker.c -Lsrc/slon/remote_worker.c -u -w -r1.112 -r1.113
--- src/slon/remote_worker.c
+++ src/slon/remote_worker.c
@@ -30,6 +30,8 @@
 #include "../parsestatements/scanner.h"
 extern STMTS[MAXSTATEMENTS];
 
+#define MAXGROUPSIZE 10000    /* What is the largest number of SYNCs we'd want to group together??? */
+
 /* ----------
  * Local definitions 
  * ----------
@@ -457,7 +459,7 @@
 		 */
 		if (strcmp(event->ev_type, "SYNC") == 0)
 		{
-			SlonWorkMsg_event *sync_group[10000];
+			SlonWorkMsg_event *sync_group[MAXGROUPSIZE];
 			int			sync_group_size;
 
 			int			seconds;
@@ -476,8 +478,8 @@
 				/* Force last_sync_group_size to a reasonable range */
 				if (last_sync_group_size < 1)
 					last_sync_group_size = 1;
-				if (last_sync_group_size > 10000)
-					last_sync_group_size = 10000;
+				if (last_sync_group_size > MAXGROUPSIZE)
+					last_sync_group_size = MAXGROUPSIZE;
 
 				gettimeofday(&sync_end, NULL);
 				last_sync_length =



More information about the Slony1-commit mailing list