gavinchou commented on code in PR #63832:
URL: https://github.com/apache/doris/pull/63832#discussion_r3322675063
##########
be/src/cloud/cloud_warm_up_manager.cpp:
##########
@@ -623,75 +683,124 @@ void CloudWarmUpManager::warm_up_rowset(RowsetMeta&
rs_meta, int64_t sync_wait_t
}
}
-void CloudWarmUpManager::_warm_up_rowset(RowsetMeta& rs_meta, int64_t
sync_wait_timeout_ms) {
+void CloudWarmUpManager::_warm_up_rowset(RowsetMeta& rs_meta, int64_t table_id,
+ int64_t sync_wait_timeout_ms) {
TEST_SYNC_POINT_CALLBACK("CloudWarmUpManager::_warm_up_rowset.enter",
&rs_meta,
&sync_wait_timeout_ms);
bool cache_hit = false;
- auto replicas = get_replica_info(rs_meta.tablet_id(), false, cache_hit);
+ auto replicas = get_replica_info(rs_meta.tablet_id(), table_id, false,
cache_hit);
if (replicas.empty()) {
VLOG_DEBUG << "There is no need to warmup tablet=" <<
rs_meta.tablet_id()
<< ", skipping rowset=" << rs_meta.rowset_id().to_string();
g_file_cache_event_driven_warm_up_skipped_rowset_num << 1;
return;
}
- Status st = _do_warm_up_rowset(rs_meta, replicas, sync_wait_timeout_ms,
!cache_hit);
+ Status st = _do_warm_up_rowset(rs_meta, table_id, replicas,
sync_wait_timeout_ms, !cache_hit);
if (cache_hit && !st.ok() && st.is<ErrorCode::TABLE_NOT_FOUND>()) {
- replicas = get_replica_info(rs_meta.tablet_id(), true, cache_hit);
- st = _do_warm_up_rowset(rs_meta, replicas, sync_wait_timeout_ms, true);
+ replicas = get_replica_info(rs_meta.tablet_id(), table_id, true,
cache_hit);
+ st = _do_warm_up_rowset(rs_meta, table_id, replicas,
sync_wait_timeout_ms, true);
}
if (!st.ok()) {
LOG(WARNING) << "Failed to warm up rowset, tablet_id=" <<
rs_meta.tablet_id()
<< ", rowset_id=" << rs_meta.rowset_id().to_string() <<
", status=" << st;
}
}
-Status CloudWarmUpManager::_do_warm_up_rowset(RowsetMeta& rs_meta,
- std::vector<TReplicaInfo>&
replicas,
+Status CloudWarmUpManager::_build_warm_up_rowset_result(
+ const std::vector<WarmUpRowsetFailure>& failures, size_t
replica_count, int64_t tablet_id,
+ const std::string& rowset_id) {
+ if (failures.empty()) {
+ return Status::OK();
+ }
+
+ int code = failures.front().code;
+ std::string failure_msg;
+ for (size_t i = 0; i < failures.size(); ++i) {
+ if (failures[i].code == ErrorCode::TABLE_NOT_FOUND) {
+ code = ErrorCode::TABLE_NOT_FOUND;
+ }
+ if (i > 0) {
+ failure_msg.append("; ");
+ }
+ failure_msg.append(failures[i].reason);
+ }
+
+ return Status::Error(code,
Review Comment:
log table_id too
--
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]