Steve Singer ssinger at ca.afilias.info
Wed Aug 3 12:53:56 PDT 2011
In doing some testing against the 2.1.0 beta I tried executing some 
slonik code like

try {
   drop node(id=3, event node=1);
}
on error {
   echo "node already gone";
}
store node(id=3, event node=1);

A script like this will fail in the current 2.1.0 betas and this 
shouldn't surprise anyone who has read about the new features in 2.1.0

A drop node requires that the cluster be somewhat caught up (at least to 
the extent that any events from the drop'd node that have been confirmed 
elsewhere are confirmed everywhere).  This means that drop node has an 
implicit 'wait for event' before it.   However you can't have 'wait for 
events' inside a try block.

I am surprised that no one else has stumbled upon this while testing 2.1.0

The options I see are

1) Accept that you can't do that type of thing anymore (using try blocks 
as control flow structures)

2)  Have some way of moving the 'wait for event' to the 'try' statement 
instead of the first statement in the try block (details and syntax 
proposals or even a patch welcome)

3) A better idea

Steve





More information about the Slony1-general mailing list