Wed Jul 7 07:41:59 PDT 2010
- Previous message: [Slony1-commit] slony1-engine/src/slony_logshipper slony_logshipper.c ipcutil.c
- 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-serv24116/src/slon Modified Files: Tag: REL_2_0_STABLE remote_worker.c Log Message: release sl_config_lock before sleeping See bug # 135, slon appeared to be waiting to get a sl_config_lock that the same slon process was already holding. slon kept sleeping waiting for a sync to catch up. Not holding the lock when we sleep should allow other threads to obtain the lock. Index: remote_worker.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v retrieving revision 1.176.2.11 retrieving revision 1.176.2.12 diff -C 2 -d -r1.176.2.11 -r1.176.2.12 *** remote_worker.c 1 Jun 2010 15:14:05 -0000 1.176.2.11 --- remote_worker.c 7 Jul 2010 14:41:57 -0000 1.176.2.12 *************** *** 1096,1099 **** --- 1096,1100 ---- query_append_event(&query1, event); slon_appendquery(&query1, "commit transaction;"); + query_execute(node, local_dbconn, &query1); slon_log(SLON_DEBUG1, "ACCEPT_SET - done\n"); *************** *** 1235,1238 **** --- 1236,1247 ---- node->no_id, sub_provider, prov_seqno); + + /** + * Release the sl_config_lock + * we want other threads to be + * able to continue during the sleep. + */ + if (query_execute(node, local_dbconn, &query2) < 0) + slon_retry(); sched_rc = sched_msleep(node, 5000); if (sched_rc != SCHED_STATUS_OK) *************** *** 1241,1244 **** --- 1250,1266 ---- break; } + /** + * Obtain the config lock again. + * it was released above. + */ + slon_mkquery(&query1, "start transaction;" + "set transaction isolation level serializable;"); + slon_appendquery(&query1, + "lock table %s.sl_config_lock; ", + rtcfg_namespace); + + if (query_execute(node, local_dbconn, &query1) < 0) + slon_retry(); + continue; }
- Previous message: [Slony1-commit] slony1-engine/src/slony_logshipper slony_logshipper.c ipcutil.c
- Next message: [Slony1-commit] slony1-engine RELEASE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list