opencurve / curve

Curve is a sandbox project hosted by the CNCF Foundation. It's cloud-native, high-performance, and easy to operate. Curve is an open-source distributed storage system for block and shared file storage.
https://opencurve.io
Apache License 2.0
2.33k stars 522 forks source link

curvefs: support x-amz-storage-class #2926

Open Tianpingan opened 11 months ago

Tianpingan commented 11 months ago

What problem does this PR solve?

Issue Number: #2783

Problem Summary:

What is changed and how it works?

What's Changed:

  1. Add support for PutObjectOptions in PutObject and PutObjectAsync methods, enabling the setting of storage class.
  2. Polish the client to align with updated PutObjectAsync method.
  3. Polish the meta_server s3compaction to align with updated PutObject method.

How it Works:

When creating a request, the configuration for storage class is encompassed within the PutObjectOptions, applied alongside both PutObject and PutObjectAsync methods. This allows us to employ PutObjectOptions to construct the S3 request, including the storage class information.

Side effects(Breaking backward compatibility? Performance regression?):

Check List

aspirer commented 11 months ago
  1. I don’t see that the s3info-related RPC request uses your newly added storageclass parameter. What is its function?
  2. Is the storage class configured at the file system level or the fuse client level? I saw that the storageclass parameter was added to the rpc parameters of your s3info, but the persistent storage operation was not seen on the mds side. How to use it later? In addition, I see that there is also a configuration item analysis of this parameter. What is the relationship between the two?
  3. Our goal is to configure it at the file system level. Each file system configures the storage class it wants to use.
h0hmj commented 11 months ago
  1. I don’t see that the s3info-related RPC request uses your newly added storageclass parameter. What is its function?
  2. Is the storage class configured at the file system level or the fuse client level? I saw that the storageclass parameter was added to the rpc parameters of your s3info, but the persistent storage operation was not seen on the mds side. How to use it later? In addition, I see that there is also a configuration item analysis of this parameter. What is the relationship between the two?
  3. Our goal is to configure it at the file system level. Each file system configures the storage class it wants to use.

Q2&3 s3info is part of fsinfo in etcd

h0hmj commented 11 months ago

need set storageclass when createfs. maybe related changes

  1. tool
  2. createfs rpc
Tianpingan commented 10 months ago

need set storageclass when createfs. maybe related changes

  1. tool
  2. createfs rpc

Got it. since the storage class is already part of S3info, so i decide to use the existing createfs rpc for tools, simply adding the storage class parameter.

Tianpingan commented 10 months ago

need set storageclass when createfs. maybe related changes

  1. tool
  2. createfs rpc

i have updated the tool in createfs/src/tools and tools-v2 to support storage class

h0hmj commented 10 months ago

cicheck

h0hmj commented 10 months ago

cicheck

Tianpingan commented 10 months ago

cicheck

h0hmj commented 10 months ago

cicheck

h0hmj commented 10 months ago

cicheck

h0hmj commented 10 months ago

cicheck

h0hmj commented 10 months ago

cicheck

h0hmj commented 10 months ago

cicheck