Commit Graph

4 Commits

Author SHA1 Message Date
slasher
5c7898354f style(all): format all codes with golangci tools
closes #3371

@formatter:off

Signed-off-by: slasher <shenjie1@oppo.com>
2024-05-14 09:54:13 +08:00
leonrayang
f97aa5717c update: name related update to cubefs
Signed-off-by: leonrayang <chl696@sina.com>
2022-08-10 22:05:45 +08:00
Mofei Zhang
fb9750c480 Fix: key encoding issue of S3 ListObjects API.
Parse parameter 'encoding-type' from request. It this parameter
specified and match with 'url', then encode content keys by using url
encoding function.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-09-27 18:20:27 +08:00
Mofei Zhang
323e529ee0
Enhancement: make ETag versioned
When ETag is stored, it is versioned by encoding, which can make
the file system interface and object storage interface more closely
integrated.

Referring to the Amazon AWS S3 Developer Guide:
"Amazon S3 response includes an ETag that uniquely identifies the
combined object data. This ETag will not necessarily be an MD5 hash
of the object data."

When a new object is written to ChubaoFS through the object storage
interface, ChubaoFS calculates the ETag value for it, and uses the
modification time of the object as its version information when
encoding and storing.

If this file is modified by the file system interface, the ETag of
this file will be invalid because the version information will be
inconsistent with modification time.

After the object storage interface finds that the ETag is invalid,
it will automatically generate a new ETag matching its modification
time.

Signed-off-by: Mofei Zhang <mofei2816@gmail.com>
2020-05-05 12:56:00 +08:00