{"record":{"id":"889645e15533e209","repo":"juicedata/juicefs","slug":"get-s-s","errorCode":null,"errorMessage":"get %s: %s","messagePattern":"get %s: %s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/chunk/cached_store.go","lineNumber":807,"sourceCode":"\t\treturn getErr\n\t}, store.conf.GetTimeout)\n\tif errors.Is(err, context.Canceled) {\n\t\treturn err\n\t}\n\tused := time.Since(start)\n\tres := getResult{sc: object.DefaultStorageClass}\n\tif err == nil {\n\t\tres = tmp\n\t}\n\tlogRequest(\"GET\", key, \"\", res.reqID, err, used)\n\tif store.downLimit != nil && compressed {\n\t\tstore.downLimit.Wait(int64(res.n))\n\t}\n\tstore.objectDataBytes.WithLabelValues(\"GET\", res.sc).Add(float64(res.n))\n\tstore.objectReqsHistogram.WithLabelValues(\"GET\", res.sc).Observe(used.Seconds())\n\tif err != nil {\n\t\tstore.objectReqErrors.Add(1)\n\t\treturn fmt.Errorf(\"get %s: %s\", key, err)\n\t}\n\tif compressed {\n\t\tres.n, err = store.compressor.Decompress(page.Data, p.Data[:res.n])\n\t}\n\tif err != nil || res.n < len(page.Data) {\n\t\treturn fmt.Errorf(\"read %s fully: %v (%d < %d) after %s\", key, err, res.n, len(page.Data), used)\n\t}\n\tif cache {\n\t\tstore.bcache.cache(key, page, forceCache, !store.conf.OSCache)\n\t}\n\treturn nil\n}\n\n// NewCachedStore create a cached store.\nfunc NewCachedStore(storage object.ObjectStorage, config Config, reg prometheus.Registerer) ChunkStore {\n\tcompressor := compress.NewCompressor(config.Compress)\n\tif compressor == nil {\n\t\tlogger.Fatalf(\"unknown compress algorithm: %s\", config.Compress)","sourceCodeStart":789,"sourceCodeEnd":825,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/chunk/cached_store.go#L789-L825","documentation":"cachedStore.load fetches a block from object storage via its store client; when that GET fails, the underlying error is wrapped as \"get <key>: <cause>\" after recording metrics and incrementing objectReqErrors. It is the generic object-storage read failure surface for the chunk layer: any transport, auth, or remote error downloading a block comes back in this form.","triggerScenarios":"Any GET issued by load against the object store that returns an error: network timeout, HTTP 403/404/5xx from S3-compatible storage, expired credentials, bucket/object deleted between lookup and fetch, or client-side connection reset.","commonSituations":"Object removed from the bucket by lifecycle rules or manual deletion while the client still expects it; IAM/STS credentials expiring mid-session; storage endpoint outage; proxy or firewall blocking egress in corporate/Kubernetes environments.","solutions":["Read the wrapped cause after 'get <key>:' — it carries the specific storage/client error to fix.","Verify the object still exists in the bucket (404 ⇒ data was deleted or written by a client with different storage config).","Refresh or fix storage credentials (expired STS tokens, rotated keys) and remount.","Check network path to the endpoint (DNS, proxy, security groups) and retry once connectivity is restored.","If reads are failing under load, enable/rely on the local cache and increase `--max-downloads` headroom or check provider rate limits."],"exampleFix":"// before: expired credentials\n//   get 0/0/1_0 myobject: AccessDenied ...\n// after: refresh credentials before mount\n//   aws s3 cp fails too => update keys, then\n//   juicefs mount --storage s3 ... (with valid credentials)","handlingStrategy":"retry","validationCode":"if err := pingObjectStorage(ctx); err != nil {\n    return fmt.Errorf(\"storage endpoint unreachable before read: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"var serr *StorageError\nif errors.As(err, &serr) || strings.HasPrefix(err.Error(), \"get \") {\n    if isRetryable(serr) {\n        return withBackoff(func() error { return readBlock(ctx, key, page) }, 3)\n    }\n    return err // non-retryable (404/403): surface to caller\n}","preventionTips":["Use IAM roles/short-lived tokens with automatic refresh instead of static keys that expire mid-session.","Disable bucket lifecycle rules (or scope them away from JuiceFS prefixes) that delete objects in use.","Ensure egress (proxy/firewall/security groups) to the storage endpoint is stable in the deployment environment.","Monitor objectReqErrors metrics and alert on sustained GET failure rates."],"tags":["object-storage","get","network","s3","download"],"backgroundTag":"http-request-failed","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}