github-actions[bot] commented on code in PR #26359:
URL: https://github.com/apache/doris/pull/26359#discussion_r1384842517
##########
be/src/olap/wal_manager.cpp:
##########
@@ -249,4 +340,38 @@ Status WalManager::delete_wal(int64_t wal_id) {
return Status::OK();
}
+bool WalManager::is_running() {
+ std::lock_guard<std::shared_mutex> wrlock(_stop_lock);
+ return !_stop;
+}
+
+void WalManager::stop_relay_wal() {
+ std::lock_guard<std::shared_mutex> wrlock(_lock);
+ for (auto it = _table_map.begin(); it != _table_map.end(); it++) {
+ it->second->stop();
+ }
+}
+
+void WalManager::add_wal_column_index(int64_t wal_id, std::vector<size_t>&
column_index) {
+ _wal_column_id_map.emplace(wal_id, column_index);
+}
+
+void WalManager::erase_wal_column_index(int64_t wal_id) {
Review Comment:
warning: method 'erase_wal_column_index' can be made static
[readability-convert-member-functions-to-static]
be/src/olap/wal_manager.h:65:
```diff
- void erase_wal_column_index(int64_t wal_id);
+ static void erase_wal_column_index(int64_t wal_id);
```
##########
be/src/olap/wal_manager.cpp:
##########
@@ -249,4 +340,38 @@
return Status::OK();
}
+bool WalManager::is_running() {
+ std::lock_guard<std::shared_mutex> wrlock(_stop_lock);
+ return !_stop;
+}
+
+void WalManager::stop_relay_wal() {
+ std::lock_guard<std::shared_mutex> wrlock(_lock);
+ for (auto it = _table_map.begin(); it != _table_map.end(); it++) {
+ it->second->stop();
+ }
+}
+
+void WalManager::add_wal_column_index(int64_t wal_id, std::vector<size_t>&
column_index) {
+ _wal_column_id_map.emplace(wal_id, column_index);
+}
+
+void WalManager::erase_wal_column_index(int64_t wal_id) {
+ if (_wal_column_id_map.erase(wal_id)) {
+ LOG(INFO) << "erase " << wal_id << " from wal_column_id_map";
+ } else {
+ LOG(WARNING) << "fail to erase wal " << wal_id << " from
wal_column_id_map";
+ }
+}
+
+Status WalManager::get_wal_column_index(int64_t wal_id, std::vector<size_t>&
column_index) {
Review Comment:
warning: method 'get_wal_column_index' can be made static
[readability-convert-member-functions-to-static]
```suggestion
static Status WalManager::get_wal_column_index(int64_t wal_id,
std::vector<size_t>& column_index) {
```
--
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]