List:Internals« Previous MessageNext Message »
From:Kay Roepke Date:September 10 2007 6:16pm
Subject:Re: second version of proposed patch for delayed replication (Bug#28760)
View as plain text  
On Sep 10, 2007, at 5:54 PM, Chad MILLER wrote:

>> Actually, it's the heart of the patch and it should be complete in  
>> itself.
>> master_delay is the value that's being read in from the  
>> master.info file, like the other members of the mi object.
>
> Sorry, to me it looks like a source of zeros.  master_delay is  
> initialized to zero, and later read as a default value if the value  
> isn't in a file.  It's never assigned a new value.  I took out the  
> definition and replaced it with  #define master_delay 0  , and it  
> does the same thing.  :\
>
>>> +          init_intvar_from_file(&delay, &mi->file,
> master_delay))
>                                     ^dest loc  ^src stream   
> ^default value if not found
>
> I asked because I thought it might be possible that you planned to  
> create a command-line parameter that set the default delay there.   
> (If that were the case, then I'd want to change the name of  
> "master_delay", to have the name "default" in it.)

Yes, sorry for the confusion. Of course you are right. I just looked  
over it again, and realized that in the original version of the patch  
(the one that used set SQL global variable) I had the setting as a  
command-line parameter. It looks like I never took it out when  
converting it to use the CHANGE MASTER statement.

I vaguely remember someone saying that it shouldn't be a command-line  
parameter because for multi-master replication it doesn't make much  
sense to provide a ton of parameters anyway, so it's probably ok to  
not provide one for this setting and to throw out the global. I think  
0 is a sensible default here.

Again, sorry for the mess.

cheers,
-k

-- 
Kay Röpke
http://classdump.org/




Thread
Re: second version of proposed patch for delayed replication (Bug#28760)Chad MILLER7 Sep
  • Re: second version of proposed patch for delayed replication (Bug#28760)Kay Roepke7 Sep
    • Re: second version of proposed patch for delayed replication (Bug#28760)Chad MILLER10 Sep
      • Re: second version of proposed patch for delayed replication (Bug#28760)Kay Roepke10 Sep