复制一些日志文件(通过gsutil compose命令创建)时:
gsutil -m cp -R gs://mybucket/PROD/ gs://mybucket/TEST/
Run Code Online (Sandbox Code Playgroud)
我们遇到了很多像这样的错误:
"errors":[
{
"domain":"usageLimits",
"reason":"rateLimitExceeded",
"message":"The total number of compose requests for this bucket's project exceeds the rate limit. Please reduce the rate of compose requests."
}
],
"code":429,
Run Code Online (Sandbox Code Playgroud)
对这些对象执行gsutil统计,我可以看到它们的Component-Count是972等等.
我们试图走捷径:
gsutil setmeta -h "Component-Count:0" gs://mybucket/PROD/composite.log
Run Code Online (Sandbox Code Playgroud)
但我们遇到了:
CommandException: Invalid or disallowed header (component-count).
Only these fields (plus x-goog-meta-* fields) can be set or unset:
Run Code Online (Sandbox Code Playgroud)
实际上,复制过程是完全执行的,所以只看到所有这些错误是非常烦人的.
有谁知道如何将组件数设置为0?