caiconghui commented on a change in pull request #8486:
URL: https://github.com/apache/incubator-doris/pull/8486#discussion_r828815838



##########
File path: be/src/olap/tablet_manager.cpp
##########
@@ -1380,18 +1249,17 @@ void 
TabletManager::obtain_specific_quantity_tablets(vector<TabletInfo>& tablets
     for (const auto& tablets_shard : _tablets_shards) {
         ReadLock rdlock(tablets_shard.lock);
         for (const auto& item : tablets_shard.tablet_map) {
-            for (TabletSharedPtr tablet : item.second.table_arr) {
-                if (tablets_info.size() >= num) {
-                    return;
-                }
-                if (tablet == nullptr) {
-                    continue;
-                }
-                TabletInfo tablet_info(tablet->get_tablet_info().tablet_id,
-                                       tablet->get_tablet_info().schema_hash,
-                                       tablet->get_tablet_info().tablet_uid);
-                tablets_info.emplace_back(tablet_info);
+            TabletSharedPtr tablet = item.second;
+            if (tablets_info.size() >= num) {
+                return;
+            }
+            if (tablet == nullptr) {
+                continue;
             }
+            TabletInfo tablet_info(tablet->get_tablet_info().tablet_id,
+                                    tablet->get_tablet_info().schema_hash,
+                                    tablet->get_tablet_info().tablet_uid);
+            tablets_info.emplace_back(tablet_info);

Review comment:
       ```suggestion
               tablets_info.emplace_back(xx, xx, xxx);
   ```




-- 
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