Hao Hao has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8144 )

Change subject: KUDU-2055 [part 3]: Refactor BlockCreationTransaction and 
BlockDeletionTransaction
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8144/4/src/kudu/fs/block_manager.h
File src/kudu/fs/block_manager.h:

http://gerrit.cloudera.org:8080/#/c/8144/4/src/kudu/fs/block_manager.h@325
PS4, Line 325:   explicit BlockDeletionTransaction(BlockManager* bm)
> Should this have a virtual dtor as well?
I read it at: http://en.cppreference.com/w/cpp/language/rule_of_three that 
virtual destructor can be 'avoided if the objects of the derived class are not 
dynamically allocated, or are dynamically allocated only to be stored in a 
std::shared_ptr (such as by std::make_shared): shared pointers invoke the 
derived class destructor even after casting to std::shared_ptr<Base>.' Since 
BlockDeletionTransaction and its subclasses will only be used with shared_ptr, 
I think it is ok to not define virtual destructor here?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I60c7d437061f98ad27b9aecda5fa89e909fb2ec6
Gerrit-Change-Number: 8144
Gerrit-PatchSet: 4
Gerrit-Owner: Hao Hao <hao....@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Hao Hao <hao....@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Fri, 29 Sep 2017 19:24:05 +0000
Gerrit-HasComments: Yes

Reply via email to