Bug 179

Summary: Implicit WAIT FOR EVENT
Product: Slony-I Reporter: Christopher Browne <cbbrowne>
Component: slonikAssignee: Steve Singer <ssinger>
Status: RESOLVED FIXED    
Severity: enhancement CC: slony1-bugs
Priority: high    
Version: devel   
Hardware: All   
OS: All   
URL: http://lists.slony.info/pipermail/slony1-general/2010-November/011288.html
Bug Depends on:    
Bug Blocks: 171, 178    
Attachments: auto_wait_for patch

Description Christopher Browne 2010-12-07 12:14:44 UTC
Should track (per Yehuda) some status information so that if it's waiting for a sustained period of time, this isn't a mystery to the user or to people monitoring things.

Slonik commands that require inter-node coordination should check to see if all relevant slon processes are running.  Notable exceptions include STORE NODE, STORE PATH

Slonik should warn or error out if the slon isn't running

Controlling Implicit WAIT FOR EVENT

To support both legacy slonik scripts and new ones, the following features are suggested:

slonik should have a command line option that deactivates "auto-wait"

It may be desirable for uses to control wait behavior inside scripts, hence we should add two slonik commands:
* activate auto wait
* deactivate auto wait
Comment 1 Christopher Browne 2011-03-09 12:27:33 UTC
Subscribe set has the ENABLE_SUBSCRIPTION event generated by slon; this likely needs to do some "guarding"
Comment 2 Christopher Browne 2011-03-09 12:28:35 UTC
A branch exists for this...
https://github.com/ssinger/slony1-engine/tree/auto_wait_for
Comment 3 Steve Singer 2011-04-25 12:35:07 UTC
Created attachment 90 [details]
auto_wait_for patch

This is a proposed patch implementing the auto/implicit wait for described by this bug.
Comment 4 Christopher Browne 2011-04-27 14:51:15 UTC
I have walked through the code and documentation, and have a number of patches to propose that generally clean things up, wordsmith, and make sure things are commented.

https://github.com/cbbrowne/slony1-engine/commits/auto_wait_for

I don't have any semantic changes to suggest.

I'm starting up various of the tests; will report back on what I find.
Comment 5 Christopher Browne 2011-04-28 08:10:55 UTC
Regression tests mostly worked fine, with some exceptions found in the DDL test:


-> % cat testResult.test.txt
12,0,test1
9,0,testdatestyles
19,3,testddl
18,0,testdeadlockddl
13,0,testinherit
9,0,testinherit
28,0,testmergeset
15,0,testmultipaths
18,0,testmultiplemoves
16,0,testomitcopy
22,0,testschemanames
18,0,testseqnames
20,0,testtabnames
16,0,testutf8

I'll poke into those 3 failures to see if they are germane.
Comment 6 Christopher Browne 2011-04-28 08:37:43 UTC
OK, running the same test against "master" gives me the same results, for the DDL test, so I think I'll open up an issue against the regression test, but point at this being "in pretty good shape."

By the way, I rather liked the addition of the function slonik_SubmitEvent(), as that looks like a nice added abstraction.
Comment 7 Steve Singer 2011-04-28 09:01:02 UTC
(In reply to comment #6)
> OK, running the same test against "master" gives me the same results, for the
> DDL test, so I think I'll open up an issue against the regression test, but
> point at this being "in pretty good shape."
> 
> By the way, I rather liked the addition of the function slonik_SubmitEvent(),
> as that looks like a nice added abstraction.

I think http://www.slony.info/bugzilla/show_bug.cgi?id=137 describes the issue you see in testddl.