Fri Mar 7 13:47:06 PST 2008
- Previous message: [Slony1-commit] slony1-engine/src/backend slony1_funcs.sql
- Next message: [Slony1-commit] slony1-engine RELEASE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slon In directory main.slony.info:/tmp/cvs-serv5617/slon Modified Files: Tag: REL_1_2_STABLE remote_worker.c Log Message: Preliminary commit of patch provided by Yoshiharu Mori: --------------------------------------------------- I send a small patch for REL_1_2_STABLE branch. When this patch was applied, the problem of "FAILOVER/MOVE_SET" was solved. This patch only move the "begin transaction; set transaction isolation level serializable; lock table "_testdbcluster".sl_config_lock;" after the processing of 'ACCEPT_SET - MOVE_SET or FAILOVER_SET not received yet - sleep' in remote_worker.c. This "ACCEPT_SET" loops used only SELECT QUERY. I don't know why it was used in islocation-level-serializable and why "lock table" is necessary. This patch doesn't care for "archive log" and take care,please. --------------------------------------------------- http://lists.slony.info/pipermail/slony1-general/2008-March/007655.html Index: remote_worker.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v retrieving revision 1.124.2.31 retrieving revision 1.124.2.32 diff -C2 -d -r1.124.2.31 -r1.124.2.32 *** remote_worker.c 6 Feb 2008 20:23:52 -0000 1.124.2.31 --- remote_worker.c 7 Mar 2008 21:47:04 -0000 1.124.2.32 *************** *** 682,685 **** --- 682,693 ---- dstring_reset(&query1); + /* start by trying to apply the lock to sl_config_lock */ + if (strcmp(event->ev_type, "ACCEPT_SET") != 0) + { + if (query_execute(node, local_dbconn, &query1) < 0) + slon_retry(); + dstring_reset(&query1); + } + /* * For all non-SYNC events, we write at least a standard *************** *** 1018,1021 **** --- 1026,1033 ---- slon_log(SLON_DEBUG2, "ACCEPT_SET - MOVE_SET or FAILOVER_SET exists - adjusting setsync status\n"); + if (query_execute(node, local_dbconn, &query1) < 0) + slon_retry(); + dstring_reset(&query1); + /* * Finalize the setsync status to mave the ACCEPT_SET's *************** *** 1057,1060 **** --- 1069,1076 ---- { slon_log(SLON_DEBUG2, "ACCEPT_SET - on origin node...\n"); + + if (query_execute(node, local_dbconn, &query1) < 0) + slon_retry(); + dstring_reset(&query1); }
- Previous message: [Slony1-commit] slony1-engine/src/backend slony1_funcs.sql
- Next message: [Slony1-commit] slony1-engine RELEASE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list