Tue Mar 29 17:24:52 PST 2005
- Previous message: [Slony1-commit] By xfade: Fix cywin macro.
- Next message: [Slony1-commit] By cbbrowne: Two changes to options: 1.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
If desired sync time is zero, then eliminate evaluation of the
"desired sync time" logic.
Modified Files:
--------------
slony1-engine/src/slon:
remote_worker.c (r1.78 -> r1.79)
-------------- next part --------------
Index: remote_worker.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -Lsrc/slon/remote_worker.c -Lsrc/slon/remote_worker.c -u -w -r1.78 -r1.79
--- src/slon/remote_worker.c
+++ src/slon/remote_worker.c
@@ -215,7 +215,7 @@
int last_sync_group_size;
int next_sync_group_size;
-int desired_sync_time = 60000;
+int desired_sync_time;
int ideal_sync ;
struct timeval sync_start;
struct timeval sync_end;
@@ -476,14 +476,18 @@
* Estimate an "ideal" number of syncs based on how long
* they took last time
*/
+ if (desired_sync_time != 0) {
ideal_sync = (last_sync_group_size * desired_sync_time) / last_sync_length;
+ } else {
+ ideal_sync = sync_group_maxsize;
+ }
max_sync = ((last_sync_group_size * 110) / 100) + 1;
next_sync_group_size = ideal_sync;
if (next_sync_group_size > max_sync)
next_sync_group_size = max_sync;
if (next_sync_group_size < 1)
next_sync_group_size = 1;
- slon_log(SLON_DEBUG2, "calc sync size - last time: %d last length: %d ideal: %d proposed size: %d\n",
+ slon_log(SLON_DEBUG3, "calc sync size - last time: %d last length: %d ideal: %d proposed size: %d\n",
last_sync_group_size, last_sync_length, ideal_sync, next_sync_group_size);
}
- Previous message: [Slony1-commit] By xfade: Fix cywin macro.
- Next message: [Slony1-commit] By cbbrowne: Two changes to options: 1.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list