Mike Percy has posted comments on this change. ( http://gerrit.cloudera.org:8080/8133 )
Change subject: [tablet copy] end session before bootstrapping tablet ...................................................................... Patch Set 1: (1 comment) > Patch Set 1: > > My understanding of it is the following. I would recommend that would browse > the code to make sure this is still the case. > > because by the time the tablet boopststraps the leader might have ended up > deleting all the logs that it needs to catch up to the leader. > - say that you have wal segments 0-10 when tablet copy starts > - tablet copy will anchor 0 until its destroyed, meaning the source wont > delete it > - when tablet copy is done the tablet still needs to boostrap which will take > some time. > - when tablet bootstrap is done the replica will need to continue catching up > to the leader, this time through consensus. It needs segment 11 to be still > available. > > We need the anchor to still be alive at this point, otherwise theres nothing > preventing the leader from anchoring segment 11 and thus making the new > replica unable to catch up. > > True that we're not optimal, we're anchoring 0 and we might only need to > anchor 10/11 but no anchor at all is likely to cause replicas to start to > fail copying. David is correct, we want to maintain the anchor until the replica starts up. That is not really sufficient since it would be better to wait until the leader connects but the intent is to try to prevent GC of logs before we can get the target replica connected to the leader and into its watermark tracking. We could make this more guaranteed than it is now, though. http://gerrit.cloudera.org:8080/#/c/8133/1/src/kudu/tserver/ts_tablet_manager.cc File src/kudu/tserver/ts_tablet_manager.cc: http://gerrit.cloudera.org:8080/#/c/8133/1/src/kudu/tserver/ts_tablet_manager.cc@a629 PS1, Line 629: : > I think it's a good idea. Let me dig in a bit to get a better understandin Agree w/ David -- To view, visit http://gerrit.cloudera.org:8080/8133 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I20592007a40113d8409f121b226bcccca14e8300 Gerrit-Change-Number: 8133 Gerrit-PatchSet: 1 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Comment-Date: Mon, 25 Sep 2017 22:20:14 +0000 Gerrit-HasComments: Yes
