Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/20868 )
Change subject: KUDU-3543 Fix Content-Type headers ...................................................................... Patch Set 4: (12 comments) http://gerrit.cloudera.org:8080/#/c/20868/3//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/20868/3//COMMIT_MSG@10 PS3, Line 10: The problem lies in the webserver's handler functions, where we use a : boolean variable called 'is_styled' to decide on the style mod > Probably, it makes sense to explain why this is/was a problem? Was/Is some Done http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/master/master-test.cc File src/kudu/master/master-test.cc: http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/master/master-test.cc@3818 PS3, Line 3818: strin > nit for here and below: remove the namespace prefix since all the types are Done http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/master/master-test.cc@3822 PS3, Line 3822: unordered_map<string, string> master_endpoints = GetMasterWebserverEndpoints(table_id); : endpoint_type_map.merge(master_endpoints); : : EasyCurl c; : c.set_return_headers(true); : f > nit: in C++-17 there is unordered_map::merge() method that could be handy t Nice, thanks for the pointer! http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/master/master-test.cc@3836 PS3, Line 3836: > How does this help with automated testing? If it doesn't help in any way, Done http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/master/master_path_handlers.cc File src/kudu/master/master_path_handlers.cc: http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/master/master_path_handlers.cc@876 PS3, Line 876: constexpr const bool is_on_nav_bar = true; > While you at this, consider removing this constant and use StyleMode::STYLE Done http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/server/default_path_handlers.cc File src/kudu/server/default_path_handlers.cc: http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/server/default_path_handlers.cc@444 PS3, Line 444: bool on_nav_bar = true; > nit: add 'const' or even 'constexpr'? Alternatively, drop this variable an Done http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/server/webserver.h File src/kudu/server/webserver.h: http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/server/webserver.h@70 PS3, Line 70: style_mode > style_mode Done http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/server/webserver.h@122 PS3, Line 122: st StyleMode s > This seems to be a part of unfinished sentence? Done http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/tserver/tablet_server-test.cc File src/kudu/tserver/tablet_server-test.cc: http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/tserver/tablet_server-test.cc@628 PS3, Line 628: g, st > nit for here and below: drop the std:: prefix Done http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/tserver/tablet_server-test.cc@643 PS3, Line 643: } : > How is this going to help in automated testing? Dropped this line. http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/util/test_util.h File src/kudu/util/test_util.h: http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/util/test_util.h@206 PS3, Line 206: std::unordered_map<std::string, std::string> GetTServerWebserverEndpoints( > Why to insist on in-lining this and other functions below? Done http://gerrit.cloudera.org:8080/#/c/20868/3/src/kudu/util/test_util.h@207 PS3, Line 207: ng& tablet_ > nit: would it make sense to have this and few other content type strings as Done -- To view, visit http://gerrit.cloudera.org:8080/20868 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I746dcfbaadb2fb95292c2d4047cb7adb9971b42f Gerrit-Change-Number: 20868 Gerrit-PatchSet: 4 Gerrit-Owner: Marton Greber <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Sun, 16 Jun 2024 10:04:22 +0000 Gerrit-HasComments: Yes
