云存储重写不重置 componentsCount 属性
Cloud storage rewrite not resetting the componentsCount property
我将几个文件合成为一个,然后执行 "rewrite" 操作来重置 componentsCount,因此它们不会阻止进一步的合成(实际上是为了避免 1024 个组件的问题)。但是,重写后的对象的 componentCount 属性 增加了,就好像它只是一个 "rename" 请求一样。
文档中有说明 (https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite):
When you rewrite a composite object where the source and destination
are different locations and/or storage classes, the result will be a
composite object containing a single component (and, as always with
composite objects, it will have only a crc32c checksum, not an MD5).
我不清楚 "different locations" 是什么意思 -- 不同的对象名称 and/or 不同的存储桶?
有没有办法重置此计数w/o 下载和上传合成结果?
位置是指源和目标存储桶所在的地理位置(us-east1、亚洲等)——请参阅 https://cloud.google.com/about/locations
如果您的重写请求是在不同位置 and/or 存储 类 的存储桶之间,该操作会进行字节复制,并且(在复合对象的情况下)将产生一个具有组件计数的新对象1. 否则操作将在没有字节复制的情况下完成,并且在这种情况下(在复合对象的情况下)不会更改组件计数。
不再需要使用 rewrite 或 download/upload 来重置组件数,因为组件数不再有限制。允许组合 > 1024 个部分。
我将几个文件合成为一个,然后执行 "rewrite" 操作来重置 componentsCount,因此它们不会阻止进一步的合成(实际上是为了避免 1024 个组件的问题)。但是,重写后的对象的 componentCount 属性 增加了,就好像它只是一个 "rename" 请求一样。
文档中有说明 (https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite):
When you rewrite a composite object where the source and destination are different locations and/or storage classes, the result will be a composite object containing a single component (and, as always with composite objects, it will have only a crc32c checksum, not an MD5).
我不清楚 "different locations" 是什么意思 -- 不同的对象名称 and/or 不同的存储桶?
有没有办法重置此计数w/o 下载和上传合成结果?
位置是指源和目标存储桶所在的地理位置(us-east1、亚洲等)——请参阅 https://cloud.google.com/about/locations
如果您的重写请求是在不同位置 and/or 存储 类 的存储桶之间,该操作会进行字节复制,并且(在复合对象的情况下)将产生一个具有组件计数的新对象1. 否则操作将在没有字节复制的情况下完成,并且在这种情况下(在复合对象的情况下)不会更改组件计数。
不再需要使用 rewrite 或 download/upload 来重置组件数,因为组件数不再有限制。允许组合 > 1024 个部分。