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

Change subject: error_manager: rename error types
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/11303/4/src/kudu/gutil/map-util.h
File src/kudu/gutil/map-util.h:

http://gerrit.cloudera.org:8080/#/c/11303/4/src/kudu/gutil/map-util.h@457
PS4, Line 457:   typedef typename Collection::mapped_type mapped_type;
             :   auto it = collection->find(key);
             :   if (it == collection->end()) {
             :     collection->emplace(key, std::forward<mapped_type>(value));
             :     return true;
             :   }
             :   it->second = std::forward<mapped_type>(value);
             :   return false;
> Why isn't this implemented more like InsertOrUpdate? Like:
What's tricky about passing the variadic rvalues is that we're passing in the 
Collection::value_type (i.e. the key-value pair), and we want to set 
`ret.first->second` to the Collection::mapped_type (i.e. the value of the 
key-value pair). I attempted to do this in CR2 and CR3,  but maybe I did it 
wrong. I'll play around with it a bit more; those revisions didn't pass the new 
test I added. My conclusion was that we couldn't make that presumption.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I377904ee51bb0f7b0f1104d7a4723f74d52e6e3f
Gerrit-Change-Number: 11303
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Comment-Date: Mon, 27 Aug 2018 22:48:49 +0000
Gerrit-HasComments: Yes

Reply via email to