[tarantool-patches] Re: [PATCH v2 1/4] relay: adjust gc state on relay status update

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Sep 20 01:02:15 MSK 2019


On 19/09/2019 15:14, Georgy Kirichenko wrote:
> On Thursday, September 19, 2019 12:45:47 AM MSK Vladislav Shpilevoy wrote:
>> Thanks for the patch!
> 
> Thanks for the review. I'll try to explain the patch here.
> A relay collects ACK's from replica. Before a parallel applier was implemented 
> there was one ACK packet per transaction. And it was to expensive to update gc 
> state for each transaction. To overwhelm this issue a relay used a trigger 
> which fires when recovery finished with a file. So, when a relay received a 
> close-log event, it waits for the first ACK greather than 'closed' vclock and 
> then advances a gc.  In case of in-memory replication we definitely couldn't 
> rely on file boundaries and on_close trigger. Because we already have parallel 
> applier we shouldn't have to much ACK packets I decided to not to use 
> on_close_log more and pass ACK direct to garbage collector.
> 
> In other words, a relay still continues gc advancing in both modes (file or 
> memory) but does it after each ACK. Also this required to change vclock 
> comparison because gc vclocks are not aligned by local xlog vclock timeline.
> 
> Yes, this changed the gc behavior - now gc keeps only local changes (because 
> an INSTANCE_ID is used). Though, this could/would be changed back when we move 
> a relay to the wal thread (what is needed for synchronous replication 
> purposes)
> 

Ok, thanks for the explanation, I think now I understand. Then this patch mostly
looks ok except minor comment about: "Prerequisites: #3794" -> "Prerequisites #3794".
Also I advise you to put some of the explanations above into the commit
message. It won't harm.




More information about the Tarantool-patches mailing list