This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 0e4809dbe88 [chore](cloud) list_snapshot allow query parameter (#61885)
0e4809dbe88 is described below

commit 0e4809dbe88bf706a3a0f3080b461799d5a603b6
Author: walter <[email protected]>
AuthorDate: Wed Apr 1 19:33:58 2026 +0800

    [chore](cloud) list_snapshot allow query parameter (#61885)
    
    Issue Number: close #xxx
    
    Related PR: #xxx
    
    Problem Summary:
---
 cloud/src/meta-service/meta_service_http.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/cloud/src/meta-service/meta_service_http.cpp 
b/cloud/src/meta-service/meta_service_http.cpp
index c1b6b4f32ad..78c608a6dc4 100644
--- a/cloud/src/meta-service/meta_service_http.cpp
+++ b/cloud/src/meta-service/meta_service_http.cpp
@@ -736,7 +736,14 @@ static HttpResponse process_unknown(MetaServiceImpl*, 
brpc::Controller* cntl) {
 
 static HttpResponse process_list_snapshot(MetaServiceImpl* service, 
brpc::Controller* ctrl) {
     ListSnapshotRequest req;
-    PARSE_MESSAGE_OR_RETURN(ctrl, req);
+    auto& uri = ctrl->http_request().uri();
+    std::string instance_id(http_query(uri, "instance_id"));
+    if (instance_id.empty()) {
+        PARSE_MESSAGE_OR_RETURN(ctrl, req);
+    } else {
+        req.set_instance_id(instance_id);
+    }
+
     ListSnapshotResponse resp;
     service->list_snapshot(ctrl, &req, &resp, nullptr);
     return http_json_reply_message(resp.status(), resp);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to