[ https://issues.apache.org/jira/browse/HBASE-17576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995881#comment-15995881 ]
Enis Soztutar commented on HBASE-17576: --------------------------------------- Doing these kind of aliases is not good in a header file. They should at least be in the hbase namespace. Please look into whether you can move them to the .cc file or not. {code} +using SharedResult = std::shared_ptr<Result>; +using FutureResult = Future<SharedResult>; +using PromiseResult = Promise<SharedResult>; +using MultiResult = std::unique_ptr<std::vector<FutureResult>>; +using Errors = std::shared_ptr<std::vector<ThrowableWithExtraContext>>; {code} - Remove this: {code} + // typedef BatchCallerBuilder GenenericThisType; {code} - Rename the name of the test to "MultiGets": {code} +TEST_F(ClientTest, PutGets) { {code} - There was an earlier comment about not iterating through these maps, because these maps are supposed to be hash maps, and this one in particular is already keyed by server name. Please do not iterate through the whole map like this: {code} + for (auto itr = actions_by_server.begin(); itr != actions_by_server.end(); ++itr) { + ServerNameEquals server_name_equals; {code} - And as we have discussed offline, we cannot be blocking on the location lookup, or in {{GetMultiResponse()}} by calling {{.get()}} on Futures. This defeats the whole purpose of the async flow. - Nit: you can just do a normal iteration here rather than using std::for_each(): {code} + std::for_each( + std::begin(region_requests), std::end(region_requests), + [®ions](const std::vector<std::shared_ptr<RegionRequest>>::value_type ®ion_request) { + regions += region_request->region_location()->region_name() + ", "; + }); {code} > [C++] Implement request retry mechanism over RPC for Multi calls. > ----------------------------------------------------------------- > > Key: HBASE-17576 > URL: https://issues.apache.org/jira/browse/HBASE-17576 > Project: HBase > Issue Type: Sub-task > Reporter: Sudeep Sunthankar > Assignee: Sudeep Sunthankar > Attachments: HBASE-17576.HBASE-14850.v10.patch, > HBASE-17576.HBASE-14850.v1.patch, HBASE-17576.HBASE-14850.v2.patch, > HBASE-17576.HBASE-14850.v3.patch, HBASE-17576.HBASE-14850.v4.patch, > HBASE-17576.HBASE-14850.v5.patch, HBASE-17576.HBASE-14850.v6.patch, > HBASE-17576.HBASE-14850.v7.patch, HBASE-17576.HBASE-14850.v8.patch, > HBASE-17576.HBASE-14850.v9.patch > > > This work is based on top of HBASE-17465. Multi Calls will be based on this. -- This message was sent by Atlassian JIRA (v6.3.15#6346)