Sat Jul 31 05:10:25 PDT 2004
- Previous message: [Slony1-commit] By darcyb: Protect against adding the same table/sequnce more than once
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Don't check for sync status on copy set if copying from the origin.
Jan
Tags:
----
REL_1_0_STABLE
Modified Files:
--------------
slony1-engine/src/slon:
remote_worker.c (r1.55.2.2 -> r1.55.2.3)
-------------- next part --------------
Index: remote_worker.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.55.2.2
retrieving revision 1.55.2.3
diff -Lsrc/slon/remote_worker.c -Lsrc/slon/remote_worker.c -u -w -r1.55.2.2 -r1.55.2.3
--- src/slon/remote_worker.c
+++ src/slon/remote_worker.c
@@ -792,6 +792,23 @@
int sub_provider = (int) strtol(event->ev_data2, NULL, 10);
int sub_receiver = (int) strtol(event->ev_data3, NULL, 10);
char *sub_forward = event->ev_data4;
+ SlonSet *rtcfg_set;
+ int set_origin = -1;
+
+ /*
+ * Lookup the origin of the set
+ */
+ rtcfg_lock();
+ for (rtcfg_set = rtcfg_set_list_head; rtcfg_set;
+ rtcfg_set = rtcfg_set->next)
+ {
+ if (rtcfg_set->set_id == sub_set)
+ {
+ set_origin = rtcfg_set->set_origin;
+ break;
+ }
+ }
+ rtcfg_unlock();
/*
* Do the actual enabling of the set only if
@@ -813,7 +830,8 @@
* node than the data provider, wait until the
* data provider has synced up far enough.
*/
- if (event->event_provider != sub_provider)
+ if (event->event_provider != sub_provider
+ && sub_provider != set_origin)
{
int64 prov_seqno = get_last_forwarded_confirm(
event->ev_origin,
- Previous message: [Slony1-commit] By darcyb: Protect against adding the same table/sequnce more than once
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list