Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8089 )

Change subject: catalog_manager: make ScopedTabletInfoCommitter generic
......................................................................


Patch Set 7:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/8089/7/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:

http://gerrit.cloudera.org:8080/#/c/8089/7/src/kudu/master/catalog_manager.cc@2518
PS7, Line 2518:       *modified_report.mutable_consensus_state() = cstate;
> Consider using std::move(cstate), although if you think it's too likely to
I'll punt since it's unrelated and will be replaced in the next patch anyway.


http://gerrit.cloudera.org:8080/#/c/8089/7/src/kudu/master/catalog_manager.cc@3703
PS7, Line 3703:           lock_out.AddMutableInfos({ std::move(new_tablet) });
> should this just use AddMutableInfo now instead of the vector?
Done


http://gerrit.cloudera.org:8080/#/c/8089/7/src/kudu/util/cow_object.h
File src/kudu/util/cow_object.h:

http://gerrit.cloudera.org:8080/#/c/8089/7/src/kudu/util/cow_object.h@353
PS7, Line 353:   // 2. That if the CowGroupLock is already locked in a 
particular mode,
> is it possible to have a DCHECK for this in some way? it seems like an API
I think we'll already get DCHECKs from within CowObject/RWCLock during 
Commit/Unlock, but I don't mind adding explicit DCHECKs here too.


http://gerrit.cloudera.org:8080/#/c/8089/7/src/kudu/util/cow_object.h@355
PS7, Line 355: const Key& key
> perhaps take this by value so you can emplace(std::move(key), object) into
It won't have any effect for TableInfo/TabletInfo (since id() returns a cref), 
but sure.


http://gerrit.cloudera.org:8080/#/c/8089/7/src/kudu/util/cow_object.h@356
PS7, Line 356:     cows_[key] = const_cast<CowObject<Value>*>(object);
> is it worth a CHECK that if we are replacing an existing entry that the 'ob
So comparing pointers? Yeah, I suppose so. I can't think of a use case for 
allowing them to actually differ.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I890db0fd18f773ab2253c49817def8162e04ad25
Gerrit-Change-Number: 8089
Gerrit-PatchSet: 7
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Fri, 22 Sep 2017 22:24:50 +0000
Gerrit-HasComments: Yes

Reply via email to