github-actions[bot] commented on code in PR #17753: URL: https://github.com/apache/doris/pull/17753#discussion_r1161512637
########## be/src/http/http_handler_with_auth.h: ########## @@ -0,0 +1,60 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#pragma once + +#include "http_handler.h" +#include "runtime/exec_env.h" + +namespace doris { + +class ExecEnv; +class TCheckAuthRequest; +class TPrivilegeHier; +class TPrivilegeType; + +// Handler for on http request with auth +class HttpHandlerWithAuth : public HttpHandler { +public: + HttpHandlerWithAuth(ExecEnv* exec_env); + + virtual ~HttpHandlerWithAuth() {} Review Comment: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] ```suggestion virtual ~HttpHandlerWithAuth() = default; ``` ########## be/src/http/http_handler_with_auth.h: ########## @@ -0,0 +1,60 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#pragma once + +#include "http_handler.h" +#include "runtime/exec_env.h" + +namespace doris { + +class ExecEnv; +class TCheckAuthRequest; +class TPrivilegeHier; +class TPrivilegeType; + +// Handler for on http request with auth +class HttpHandlerWithAuth : public HttpHandler { +public: + HttpHandlerWithAuth(ExecEnv* exec_env); + + virtual ~HttpHandlerWithAuth() {} Review Comment: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] ```suggestion ~HttpHandlerWithAuth() override {} ``` ########## be/src/http/http_handler_with_auth.h: ########## @@ -0,0 +1,60 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#pragma once + +#include "http_handler.h" +#include "runtime/exec_env.h" + +namespace doris { + +class ExecEnv; +class TCheckAuthRequest; +class TPrivilegeHier; +class TPrivilegeType; + +// Handler for on http request with auth +class HttpHandlerWithAuth : public HttpHandler { +public: + HttpHandlerWithAuth(ExecEnv* exec_env); + + virtual ~HttpHandlerWithAuth() {} + + // return 0 if auth pass, otherwise -1. + virtual int on_header(HttpRequest* req) override; Review Comment: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] ```suggestion int on_header(HttpRequest* req) override; ``` ########## be/test/olap/tablet_test.cpp: ########## @@ -269,7 +267,7 @@ TEST_F(TestTablet, pad_rowset) { ASSERT_FALSE(_tablet->capture_rs_readers(version, &readers).ok()); readers.clear(); - PadRowsetAction action; + PadRowsetAction action(nullptr); action._pad_rowset(_tablet, version); Review Comment: warning: '_pad_rowset' is a private member of 'doris::PadRowsetAction' [clang-diagnostic-error] ```cpp action._pad_rowset(_tablet, version); ^ ``` **be/src/http/action/pad_rowset_action.h:43:** declared private here ```cpp Status _pad_rowset(TabletSharedPtr tablet, const Version& version); ^ ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org