对象更改通知比文件上传晚几分钟传递

object change notifications are delivered many minutes later than the file is uploaded

当使用可恢复上传将文件上传到 google 云存储并在上传最后一个块后获得 2xx 代码时,有时需要几秒钟才能收到通知,有时它们会延迟多达 40 !分钟。这是极其不可预测的,会导致糟糕的用户体验。

有人能帮我解释一下我哪里做错了吗?

hook 响应示例(我使用 2xx 状态代码正确接受它们)

{ "name": "core-api", "hostname": "http-in-production-0", "pid": 1, "namespace": "audit", "audit": true, "level": 30, "remoteAddress": "10.240.0.6", "remotePort": 36689, "req_id": "6feb5f2a-82aa-4d24-b844-2db915868fd3", "req": { "query": {}, "method": "POST", "url": "/api/files/gce", "headers": { "host": "redacted.com", "accept-encoding": "gzip", "cf-ipcountry": "US", "x-forwarded-for": "66.102.6.238", "cf-ray": "2bba889f9fcb5011-DEN", "content-length": "1306", "cf-visitor": "{\"scheme\":\"https\"}", "accept": "*/*", "x-goog-channel-id": "cdn-channel-id-redacted", "x-goog-resource-state": "exists", "x-goog-message-number": "9748944617", "x-goog-resource-id": "-----resource-id------", "x-goog-resource-uri": "https://www.googleapis.com/storage/v1/b/cdn.redacted.com/o?alt=json", "x-goog-channel-token": "secret-token-redacted", "content-type": "application/json; charset=UTF-8", "user-agent": "APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html)", "cf-connecting-ip": "66.102.6.238", "x-forwarded-proto": "https", "connection": "close" }, "httpVersion": "1.1", "trailers": {}, "version": "*", "timers": { "remapXFFheader": 32, "restifyCORSSimple": 16, "parseAccept": 120, "parseQueryString": 22, "gzip": 887, "checkIfMatch": 27, "checkIfNoneMatch": 22, "checkIfModified": 45, "checkIfUnmodified": 18, "remapContentType": 10, "readBody": 343, "parseBody": 57, "restifyLogger": 205, "attachAMQP": 19, "initContext": 12, "activateAccount": 542, "handeReact": 411, "responseContentType": 27, "gceWebhook": 304, "completeResumableUpload": 55245 } }, "res": { "statusCode": 202, "headers": { "content-encoding": "gzip", "content-type": "application/vnd.api+json" }, "trailer": false }, "err": null, "latency": 63, "_audit": true, "msg": "handled: 202", "time": "2016-07-01T14:26:33.645Z", "v": 0 }

请参阅文档的 Reliable Delivery 部分。特别是,我将在这里引用:

Object Change Notification will attempt to deliver notifications to your application in a reliable way. However, be aware that notifications can be delayed indefinitely, and timeliness is not guaranteed.