Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9452 )

Change subject: KUDU-2293 fix cleanup after failed copies
......................................................................


Patch Set 10:

(4 comments)

Just responding to your question

http://gerrit.cloudera.org:8080/#/c/9452/10/src/kudu/tserver/tablet_copy_client.h
File src/kudu/tserver/tablet_copy_client.h:

http://gerrit.cloudera.org:8080/#/c/9452/10/src/kudu/tserver/tablet_copy_client.h@140
PS10, Line 140:     // The copy has yet to do anything.
> Let's add something to the effect of: No changes have yet been made on disk
Done


http://gerrit.cloudera.org:8080/#/c/9452/10/src/kudu/tserver/tablet_copy_client.h@143
PS10, Line 143: updating metadata
> Edit: update metadata on disk
Done


http://gerrit.cloudera.org:8080/#/c/9452/10/src/kudu/tserver/tablet_copy_client.cc
File src/kudu/tserver/tablet_copy_client.cc:

http://gerrit.cloudera.org:8080/#/c/9452/10/src/kudu/tserver/tablet_copy_client.cc@213
PS10, Line 213:
> OK. So I our guarantees are the following, which we should document in the
Done


http://gerrit.cloudera.org:8080/#/c/9452/10/src/kudu/tserver/tablet_copy_client.cc@458
PS10, Line 458:   fs_manager_->dd_manager()->DeleteDataDirGroup(tablet_id_);
> OK, so we call TSTabletManager::DeleteTabletData() which calls TabletMetada
1. If we don't remove the data dir group, if we ever try to create a new data 
dir group thereafter, the caller would get an AlreadyPresent error. Right now, 
removal of data dir groups can't fail (if the group is already removed, it's a 
no-op).
2. I think it'd only be really wrong to remove a tablet's entry is if we 
_actually_ wanted to continue writing new blocks to that tablet. I.e. if we for 
some reason delete the tablet's data dir group and then call GetNextBlock() for 
that tablet, the caller would get an error. In the case of deleting tablet 
data, I think the assumption is that the tablet is being or has been shut down, 
so we wouldn't use the data dir group anyway. In the context of a tablet copy, 
I think we're guaranteed to be the only writer to the replica, and upon 
Abort()ing, we wouldn't write any more blocks to that tablet.



--
To view, visit http://gerrit.cloudera.org:8080/9452
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0459d484a3064aa2de392328e2910c9f6741be04
Gerrit-Change-Number: 9452
Gerrit-PatchSet: 10
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Comment-Date: Mon, 09 Apr 2018 22:09:27 +0000
Gerrit-HasComments: Yes

Reply via email to