github-actions[bot] commented on code in PR #38415: URL: https://github.com/apache/doris/pull/38415#discussion_r1692771779
########## be/src/olap/storage_policy.h: ########## @@ -18,7 +18,6 @@ #pragma once #include <fmt/format.h> Review Comment: warning: 'fmt/format.h' file not found [clang-diagnostic-error] ```cpp #include <fmt/format.h> ^ ``` ########## cloud/src/recycler/inverted_index_info_cache.h: ########## @@ -0,0 +1,77 @@ +// 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 <memory> +#include <string> +#include <unordered_map> +#include <unordered_set> +#include <variant> +#include <vector> + +namespace doris { +class TabletSchemaCloudPB; +namespace cloud { +class TxnKv; + +struct NoInvertedIndex {}; +using InvertedIndexInfoV1 = std::vector< + std::pair<int64_t /* inverted_index_id */, std::string /* index_path_suffix */>>; +struct InvertedIndexInfoV2 {}; +struct UnknownInvertedIndex {}; + +using InvertedIndexInfo = std::variant<UnknownInvertedIndex, NoInvertedIndex, InvertedIndexInfoV1, + InvertedIndexInfoV2>; + +InvertedIndexInfo into_inverted_index_info(const doris::TabletSchemaCloudPB& schema); + +class InvertedIndexInfoCache { +public: + InvertedIndexInfoCache(std::string instance_id, std::shared_ptr<TxnKv> txn_kv); + ~InvertedIndexInfoCache(); + + // Return 0 if success, 1 if schema kv not found, negative for error + int get(int64_t index_id, int32_t schema_version, InvertedIndexInfo& res); + +private: + void insert(int64_t index_id, int32_t schema_version, InvertedIndexInfo info); + + std::string instance_id_; + std::shared_ptr<TxnKv> txn_kv_; + + using Key = std::pair<int64_t, int32_t>; // <index_id, schema_version> + struct HashOfKey { + size_t operator()(const Key& key) const { + size_t seed = 0; + seed = std::hash<int64_t> {}(key.first); + seed = std::hash<int32_t> {}(key.second); + return seed; + } + }; + + std::mutex mtx_; Review Comment: warning: no type named 'mutex' in namespace 'std' [clang-diagnostic-error] ```cpp std::mutex mtx_; ^ ``` ########## cloud/src/recycler/util.cpp: ########## @@ -17,10 +17,9 @@ #include "recycler/util.h" Review Comment: warning: 'recycler/util.h' file not found [clang-diagnostic-error] ```cpp #include "recycler/util.h" ^ ``` ########## cloud/src/recycler/storage_vault.h: ########## @@ -0,0 +1,105 @@ +// 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 <memory> +#include <optional> +#include <string> + +#include "cpp/remote_path_helper.h" Review Comment: warning: 'cpp/remote_path_helper.h' file not found [clang-diagnostic-error] ```cpp #include "cpp/remote_path_helper.h" ^ ``` ########## cloud/src/recycler/inverted_index_info_cache.cpp: ########## @@ -0,0 +1,130 @@ +// 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. + +#include "recycler/inverted_index_info_cache.h" Review Comment: warning: 'recycler/inverted_index_info_cache.h' file not found [clang-diagnostic-error] ```cpp #include "recycler/inverted_index_info_cache.h" ^ ``` ########## common/cpp/remote_path_helper.h: ########## @@ -0,0 +1,58 @@ +// 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 <glog/logging.h> Review Comment: warning: 'glog/logging.h' file not found [clang-diagnostic-error] ```cpp #include <glog/logging.h> ^ ``` ########## cloud/src/recycler/storage_vault.cpp: ########## @@ -0,0 +1,368 @@ +// 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. + +#include "recycler/storage_vault.h" Review Comment: warning: 'recycler/storage_vault.h' file not found [clang-diagnostic-error] ```cpp #include "recycler/storage_vault.h" ^ ``` -- 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