w41ter commented on code in PR #56888:
URL: https://github.com/apache/doris/pull/56888#discussion_r2425175290


##########
cloud/src/meta-store/meta_reader.cpp:
##########
@@ -675,6 +675,57 @@ TxnErrorCode 
MetaReader::get_all_tablet_rowset_metas(Transaction* txn, int64_t s
     return TxnErrorCode::TXN_OK;
 }
 
+TxnErrorCode MetaReader::get_all_tablet_metas(std::vector<TabletMetaCloudPB>* 
tablet_metas,
+                                              bool snapshot) {
+    DCHECK(txn_kv_) << "TxnKv must be set before calling";
+    if (!txn_kv_) {
+        return TxnErrorCode::TXN_INVALID_ARGUMENT;
+    }
+    std::unique_ptr<Transaction> txn;
+    TxnErrorCode err = txn_kv_->create_txn(&txn);
+    if (err != TxnErrorCode::TXN_OK) {
+        return err;
+    }
+    return get_all_tablet_metas(txn.get(), tablet_metas, snapshot);
+}
+
+TxnErrorCode MetaReader::get_all_tablet_metas(Transaction* txn,

Review Comment:
   What will happen if an instance has 1M tablets?



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