github-actions[bot] commented on code in PR #31317:
URL: https://github.com/apache/doris/pull/31317#discussion_r1502693573


##########
be/src/cloud/cloud_txn_delete_bitmap_cache.cpp:
##########
@@ -0,0 +1,193 @@
+// 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 "cloud/cloud_txn_delete_bitmap_cache.h"
+
+#include <fmt/core.h>
+
+#include <chrono>
+#include <memory>
+#include <shared_mutex>
+
+#include "common/status.h"
+#include "common/sync_point.h"
+#include "olap/olap_common.h"
+#include "olap/tablet_meta.h"
+
+namespace doris {
+
+// TODO sweep time
+CloudTxnDeleteBitmapCache::CloudTxnDeleteBitmapCache(size_t size_in_bytes)
+        : 
LRUCachePolicy(CachePolicy::CacheType::CLOUD_TXN_DELETE_BITMAP_CACHE, 
size_in_bytes,
+                         LRUCacheType::SIZE, 
config::pk_index_page_cache_stale_sweep_time_sec, 4),
+          _stop_latch(1) {}
+
+CloudTxnDeleteBitmapCache::~CloudTxnDeleteBitmapCache() {

Review Comment:
   warning: use '= default' to define a trivial destructor 
[modernize-use-equals-default]
   ```cpp
   CloudTxnDeleteBitmapCache::~CloudTxnDeleteBitmapCache() {
                              ^
   ```
   



##########
be/src/cloud/cloud_txn_delete_bitmap_cache.cpp:
##########
@@ -0,0 +1,193 @@
+// 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 "cloud/cloud_txn_delete_bitmap_cache.h"
+
+#include <fmt/core.h>
+
+#include <chrono>
+#include <memory>
+#include <shared_mutex>
+
+#include "common/status.h"
+#include "common/sync_point.h"
+#include "olap/olap_common.h"
+#include "olap/tablet_meta.h"
+
+namespace doris {
+
+// TODO sweep time
+CloudTxnDeleteBitmapCache::CloudTxnDeleteBitmapCache(size_t size_in_bytes)
+        : 
LRUCachePolicy(CachePolicy::CacheType::CLOUD_TXN_DELETE_BITMAP_CACHE, 
size_in_bytes,
+                         LRUCacheType::SIZE, 
config::pk_index_page_cache_stale_sweep_time_sec, 4),
+          _stop_latch(1) {}
+
+CloudTxnDeleteBitmapCache::~CloudTxnDeleteBitmapCache() {
+    _stop_latch.count_down();
+    _clean_thread->join();
+}
+
+Status CloudTxnDeleteBitmapCache::init() {

Review Comment:
   warning: method 'init' can be made static 
[readability-convert-member-functions-to-static]
   
   be/src/cloud/cloud_txn_delete_bitmap_cache.h:37:
   ```diff
   -     Status init();
   +     static Status init();
   ```
   



##########
be/src/cloud/cloud_txn_delete_bitmap_cache.h:
##########
@@ -0,0 +1,95 @@
+// 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 <mutex>
+
+#include "olap/lru_cache.h"
+#include "olap/olap_common.h"
+#include "olap/partial_update_info.h"
+#include "olap/rowset/rowset.h"
+#include "olap/tablet_meta.h"
+#include "util/countdown_latch.h"
+
+namespace doris {
+
+// Record transaction related delete bitmaps using a lru cache.
+class CloudTxnDeleteBitmapCache : public LRUCachePolicy {
+public:
+    CloudTxnDeleteBitmapCache(size_t size_in_bytes);
+
+    ~CloudTxnDeleteBitmapCache();

Review Comment:
   warning: annotate this function with 'override' or (rarely) 'final' 
[modernize-use-override]
   
   ```suggestion
       ~CloudTxnDeleteBitmapCache() override;
   ```
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to