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


##########
cloud/src/recycler/obj_store_accessor.h:
##########
@@ -69,4 +71,44 @@ class ObjStoreAccessor {
     const AccessorType type_;
 };
 
+struct ObjectStoragePathOptions {
+    std::string bucket; // blob container in azure
+    std::string key;    // blob name
+    std::string prefix; // for batch delete and recursive delete
+    std::string_view endpoint;
+};
+
+struct ObjectStorageDeleteExpiredOptions {
+    ObjectStoragePathOptions path_opts;
+    std::function<std::string(const std::string& path)> relative_path_factory;
+};
+
+struct ObjectCompleteMultiParts {};
+
+struct ObjectStorageResponse {
+    ObjectStorageResponse(int r) : ret(r) {}
+    int ret {0};
+};
+
+// wrapper class owned by concret fs
+class ObjStorageClient {

Review Comment:
   Add enough/detailed comments to describe the behavior of each function as 
much as possible



##########
cloud/src/recycler/obj_store_accessor.h:
##########
@@ -69,4 +71,44 @@ class ObjStoreAccessor {
     const AccessorType type_;
 };
 
+struct ObjectStoragePathOptions {
+    std::string bucket; // blob container in azure
+    std::string key;    // blob name
+    std::string prefix; // for batch delete and recursive delete
+    std::string_view endpoint;
+};
+
+struct ObjectStorageDeleteExpiredOptions {
+    ObjectStoragePathOptions path_opts;
+    std::function<std::string(const std::string& path)> relative_path_factory;
+};
+
+struct ObjectCompleteMultiParts {};
+
+struct ObjectStorageResponse {
+    ObjectStorageResponse(int r) : ret(r) {}
+    int ret {0};

Review Comment:
   Is this for "return code"?
   If yes, try to make it `enum class` or pre-define some constants for codes



##########
cloud/src/recycler/s3_obj_client.cpp:
##########
@@ -0,0 +1,370 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "recycler/s3_obj_client.h"
+
+#include <aws/s3/S3Client.h>
+#include <aws/s3/model/DeleteObjectRequest.h>
+#include <aws/s3/model/DeleteObjectsRequest.h>
+#include <aws/s3/model/GetBucketLifecycleConfigurationRequest.h>
+#include <aws/s3/model/GetBucketVersioningRequest.h>
+#include <aws/s3/model/HeadObjectRequest.h>
+#include <aws/s3/model/ListObjectsV2Request.h>
+#include <aws/s3/model/PutObjectRequest.h>
+
+#include "common/logging.h"
+#include "common/sync_point.h"
+
+namespace doris::cloud {
+
+#ifndef UNIT_TEST
+#define HELP_MACRO(ret, req, point_name)

Review Comment:
   typo, HELPER_MACRO



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