gavinchou commented on code in PR #57379:
URL: https://github.com/apache/doris/pull/57379#discussion_r2468147077


##########
cloud/src/meta-service/meta_service_resource.cpp:
##########
@@ -215,6 +217,235 @@ static void async_notify_refresh_instance(
     }
 }
 
+// Find all instances that need cascade update using BFS traversal
+// Returns 0 on success, -1 on error
+// Uses separate read-only transactions to avoid read conflicts with the main 
write transaction
+static int collect_direct_derived_instances(TxnKv* txn_kv, const std::string& 
source_instance_id,
+                                            std::vector<std::string>* 
derived_ids) {
+    if (!derived_ids) {
+        return -1;
+    }
+    derived_ids->clear();
+
+    if (source_instance_id.empty()) {
+        return 0;
+    }
+
+    constexpr Versionstamp kMinVersionstamp = Versionstamp::min();
+    constexpr Versionstamp kMaxVersionstamp = Versionstamp::max();
+
+    std::string key_start =
+            versioned::snapshot_reference_key_prefix(source_instance_id, 
kMinVersionstamp);
+    std::string key_end =
+            versioned::snapshot_reference_key_prefix(source_instance_id, 
kMaxVersionstamp);

Review Comment:
   not exactly correct



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