bobhan1 commented on code in PR #67989:
URL: https://github.com/apache/doris/pull/67989#discussion_r4056763147


##########
cloud/src/meta-service/meta_service_txn.cpp:
##########
@@ -1800,6 +1800,26 @@ std::pair<MetaServiceCode, std::string> 
get_partition_versions(
     return {MetaServiceCode::OK, ""};
 }
 
+static void check_commit_txn_partition_count(const CommitTxnRequest* request,
+                                             CommitTxnResponse* response) {
+    int64_t num_partitions = response->partition_ids_size();
+    if (!request->has_num_partitions() || request->num_partitions() == 
num_partitions) {
+        return;
+    }
+    LOG(WARNING) << "commit txn partition count mismatch, txn_id=" << 
request->txn_id()
+                 << " table_ids="
+                 << fmt::format("[{}]", 
fmt::join(response->txn_info().table_ids(), ", "))
+                 << " expected_partitions=" << request->num_partitions()
+                 << " actual_partitions=" << num_partitions;
+    // A retry may scan only partitions left by a concurrent lazy committer.
+    // Empty both version lists and table stats to trigger FE cache 
invalidation.
+    response->clear_table_ids();
+    response->clear_partition_ids();
+    response->clear_versions();
+    response->clear_table_stats();

Review Comment:
   无所谓



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