Tue May 3 17:16:26 PDT 2005
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message: ----------- ACCEPT_SET could not find the corresponding MOVE_SET's event number, preventing it from functioning. Alas, there is no way to find MOVE_SET event number from the node that is issuing the ACCEPT_SET. Modified Files: -------------- slony1-engine/src/backend: slony1_funcs.sql (r1.61 -> r1.62) slony1-engine/src/slon: local_listen.c (r1.30 -> r1.31) remote_worker.c (r1.79 -> r1.80) -------------- next part -------------- Index: slony1_funcs.sql =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v retrieving revision 1.61 retrieving revision 1.62 diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.61 -r1.62 --- src/backend/slony1_funcs.sql +++ src/backend/slony1_funcs.sql @@ -1962,17 +1962,9 @@ -- On the new origin, raise an event - ACCEPT_SET if v_local_node_id = p_new_origin then - -- Find the event number from the origin - select max(ev_seqno) as seqno into v_sub_row - from @NAMESPACE at .sl_event - where ev_type = ''MOVE_SET'' and - ev_data1 = p_set_id and - ev_data2 = p_old_origin and - ev_data3 = p_new_origin and - ev_origin = p_old_origin; perform @NAMESPACE at .createEvent(''_ at CLUSTERNAME@'', ''ACCEPT_SET'', - p_set_id, p_old_origin, p_new_origin, v_sub_row.seqno); + p_set_id, p_old_origin, p_new_origin); end if; -- ---- Index: remote_worker.c =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/remote_worker.c,v retrieving revision 1.79 retrieving revision 1.80 diff -Lsrc/slon/remote_worker.c -Lsrc/slon/remote_worker.c -u -w -r1.79 -r1.80 --- src/slon/remote_worker.c +++ src/slon/remote_worker.c @@ -888,11 +888,15 @@ } else if (strcmp(event->ev_type, "ACCEPT_SET") == 0) { + slon_log(SLON_DEBUG2, "start processing ACCEPT_SET\n"); int set_id = (int) strtol(event->ev_data1, NULL, 10); + slon_log(SLON_DEBUG2, "ACCEPT: set=%d\n", set_id); int old_origin = (int) strtol(event->ev_data2, NULL, 10); + slon_log(SLON_DEBUG2, "ACCEPT: old origin=%d\n", old_origin); int new_origin = (int) strtol(event->ev_data3, NULL, 10); - int seq_no = (int) strtol(event->ev_data4, NULL, 10); + slon_log(SLON_DEBUG2, "ACCEPT: new origin=%d\n", new_origin); PGresult *res; + slon_log(SLON_DEBUG2, "got parms ACCEPT_SET\n"); /* If we're a remote node, and haven't yet * received the MOVE_SET event from the @@ -905,6 +909,7 @@ * received and processed */ if ((rtcfg_nodeid != old_origin) && (rtcfg_nodeid != new_origin)) { + slon_log(SLON_DEBUG2, "ACCEPT_SET - node not origin - wait...\n"); slon_mkquery(&query1, "select 1 from %s.sl_event accept " "where " @@ -913,7 +918,6 @@ " accept.ev_data1 = %d and " " accept.ev_data2 = %d and " " accept.ev_data3 = %d and " - " accept.ev_data4 = %d and " " not exists " " (select 1 from %s.sl_event move " " where " @@ -921,12 +925,11 @@ " move.ev_type = 'MOVE_SET' and " " move.ev_data1 = accept.ev_data1 and " " move.ev_data2 = accept.ev_data2 and " - " move.ev_data3 = accept.ev_data3 and " - " move.ev_seqno = %d); ", + " move.ev_data3 = accept.ev_data3); ", rtcfg_namespace, - old_origin, set_id, old_origin, new_origin, seq_no, - rtcfg_namespace, seq_no); + old_origin, set_id, old_origin, new_origin, + rtcfg_namespace); res = PQexec(local_dbconn, dstring_data(&query1)); while (PQntuples(res) > 0) { int sleeptime = 15; @@ -945,7 +948,10 @@ } res = PQexec(local_dbconn, dstring_data(&query1)); } + } else { + slon_log(SLON_DEBUG2, "ACCEPT_SET - on origin node...\n"); } + slon_log(SLON_DEBUG2, "ACCEPT_SET - done...\n"); } else if (strcmp(event->ev_type, "MOVE_SET") == 0) Index: local_listen.c =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/local_listen.c,v retrieving revision 1.30 retrieving revision 1.31 diff -Lsrc/slon/local_listen.c -Lsrc/slon/local_listen.c -u -w -r1.30 -r1.31 --- src/slon/local_listen.c +++ src/slon/local_listen.c @@ -611,10 +611,22 @@ * Nothing to do ATM */ } + else if (strcmp(ev_type, "ACCEPT_SET") == 0) + { + /* + * ACCEPT_SET + */ + + /* + * Nothing to do locally + */ + slon_log(SLON_DEBUG2, "localListenThread: ACCEPT_SET"); + rtcfg_reloadListen(dbconn); + } else { slon_log(SLON_FATAL, - "localListenThread: event %s: Unknown event type %s\n", + "localListenThread: event %s: Unknown event type: %s\n", rtcfg_lastevent, ev_type); slon_abort(); }
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list