You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2021/03/31 16:18:47 UTC
[kudu] branch master updated: [master] avoid copy when iterate
req.new_extra_configs()
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new c2b4eb2 [master] avoid copy when iterate req.new_extra_configs()
c2b4eb2 is described below
commit c2b4eb2b65edd0911916d54fcda1208134f902a6
Author: shenxingwuying <sh...@gmail.com>
AuthorDate: Wed Mar 31 17:03:00 2021 +0800
[master] avoid copy when iterate req.new_extra_configs()
req.new_extra_configs is copied when iterating
Change-Id: Ib1b20be6a6a64ab7109d7fef9287223209721078
Reviewed-on: http://gerrit.cloudera.org:8080/17247
Tested-by: Alexey Serbin <as...@cloudera.com>
Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
src/kudu/master/catalog_manager.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kudu/master/catalog_manager.cc b/src/kudu/master/catalog_manager.cc
index 939d462..f3c2422 100644
--- a/src/kudu/master/catalog_manager.cc
+++ b/src/kudu/master/catalog_manager.cc
@@ -2931,7 +2931,7 @@ Status CatalogManager::AlterTable(const AlterTableRequestPB& req,
RETURN_NOT_OK(ExtraConfigPBToPBMap(l.data().pb.extra_config(),
&new_extra_configs));
// Merge table's extra configuration properties.
- for (auto config : req.new_extra_configs()) {
+ for (const auto& config : req.new_extra_configs()) {
new_extra_configs[config.first] = config.second;
}
RETURN_NOT_OK(ExtraConfigPBFromPBMap(new_extra_configs,