From: SourceForge.net <no...@so...> - 2007-12-13 21:24:31
|
Patches item #1844561, was opened at 2007-12-04 18:05 Message generated for change (Comment added) made by breed You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1008546&aid=1844561&group_id=209147 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: server Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Mahadev Konar (mahadevkonar) Assigned to: Nobody/Anonymous (nobody) Summary: fast sync between the leader and the follower. Initial Comment: this patch implements a fast sync between the leader adn the follower. THe leader maintains a queue of 500 requests in memory that have been committed and when a follower joins sends the diff to the follower. In case the follower is really behind, it will get the whole snapshot. In case the follower is ahead of the leader it will truncate the logs and then proceed.. ---------------------------------------------------------------------- >Comment By: Benjamin Reed (breed) Date: 2007-12-13 13:24 Message: Logged In: YES user_id=154690 Originator: NO FinalRequestProcessor: Shouldn't the zks.addCommittedProposal happen inside the sync block of zks.outstandingChanges? I think that switch should happen atomically. Follower: in the case of Leader.DIFF it would be nice to have a comment that says after loadData // Now process the diffs that come from the leader as normal updates. Also, the zxid of truncate is the last zxid to KEEP not the first to DELETE right? In truncate() it looks like you are DELETEing zxid and up. FollowerHandler: It looks like you are missing a TRUNC case: Imagine the follower has seen (1,32) (where 1 is epoch and 32 is the count) and the leader has seen and committed: (1,31), (2,0), (2,1), (2,1). It doesn't look like (1,32) will be truncated from the follower's log. ---------------------------------------------------------------------- Comment By: Mahadev Konar (mahadevkonar) Date: 2007-12-13 11:38 Message: Logged In: YES user_id=1926680 Originator: YES uploading the patch becaue the previous one conflicts with the trunk.. File Added: fast-sync-follower-leader-3.patch ---------------------------------------------------------------------- Comment By: Mahadev Konar (mahadevkonar) Date: 2007-12-12 12:37 Message: Logged In: YES user_id=1926680 Originator: YES can you guys review this patch before I go off for vacation? i want to get it in so that it does not get stale. ---------------------------------------------------------------------- Comment By: Mahadev Konar (mahadevkonar) Date: 2007-12-07 15:06 Message: Logged In: YES user_id=1926680 Originator: YES this patch applies to the current trunk. No specific changes. File Added: fast-sync-follower-leader-2.patch ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1008546&aid=1844561&group_id=209147 |