yiguolei commented on code in PR #9890:
URL: https://github.com/apache/incubator-doris/pull/9890#discussion_r886649634
##########
be/src/olap/tablet_manager.cpp:
##########
@@ -601,6 +601,22 @@ void TabletManager::get_tablet_stat(TTabletStatResult*
result) {
result->__set_tablet_stat_list(*local_cache);
}
+void TabletManager::find_tablet_have_alpha_rowset(const std::vector<DataDir*>&
data_dirs,
+
std::vector<TabletSharedPtr>& tablets) {
+ for (auto data_dir : data_dirs) {
+ for (const auto& tablets_shard : _tablets_shards) {
+ std::shared_lock rdlock(tablets_shard.lock);
+ for (const auto& tablet_map : tablets_shard.tablet_map) {
+ const TabletSharedPtr& tablet_ptr = tablet_map.second;
+ if (!tablet_ptr->all_beta() &&
+ tablet_ptr->can_do_compaction(data_dir->path_hash(),
BASE_COMPACTION)) {
Review Comment:
这里不用这么写,我觉得你参考的那个find compaction的代码写错了。 现在can_do_compaction 它要求传入一个data
dir的参数,那么你就tablet_ptr->can_do_compaction(tablet_ptr->data_dir().... 这样硬传入一个就好了
--
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]