{"record":{"id":"6a878f780155a643","repo":"juicedata/juicefs","slug":"errnotsup","errorCode":"ErrNotSUP","errorMessage":"not supported","messagePattern":"not supported","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"info","filePath":"pkg/utils/errors.go","lineNumber":25,"sourceCode":" *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage utils\n\nimport (\n\t\"errors\"\n\t\"syscall\"\n)\n\nvar (\n\tErrNotSUP      = errors.New(\"not supported\")\n\tErrFuncTimeout = errors.New(\"function timeout\")\n\tErrSkipped     = errors.New(\"skipped\")\n\tErrExtlink     = syscall.Errno(1000)\n)\n","sourceCodeStart":7,"sourceCodeEnd":30,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/utils/errors.go#L7-L30","documentation":"utils.ErrNotSUP is JuiceFS's sentinel for operations the backing object storage does not implement (chown/chmod/chtimes-style metadata ops, etc.). objbench treats a return of this error as \"not supported\" and marks the benchmark case accordingly rather than as a failure.","triggerScenarios":"Calling unsupported APIs such as chown/chmod/chtimes via benchMarkObj.run, or any List/UploadPart implementation that doesn't support a feature; runCase in objbench converting it to an 'unsupported' result.","commonSituations":"Benchmarking object stores (e.g. S3) that have no POSIX ownership/permission model; using a minimal backend that omits optional interfaces.","solutions":["Treat this error as expected — skip or mark the operation unsupported (as objbench does with errors.Is)","Avoid calling the unsupported API on that backend","Use a backend/ACL layer that supports the operation if the capability is required"],"exampleFix":"// before\nif err := doChmod(ctx, key); err != nil { return err }\n// after\nif err := doChmod(ctx, key); err != nil {\n\tif errors.Is(err, utils.ErrNotSUP) { return nil } // unsupported here\n\treturn err\n}","handlingStrategy":"try-catch","validationCode":"// feature-detect before calling\ntype chownSupport interface{ Chown(ctx context.Context, key string, owner, group uint32) error }\n_, supported := store.(chownSupport)","typeGuard":"func isUnsupported(err error) bool { return errors.Is(err, utils.ErrNotSUP) }","tryCatchPattern":"if err := op(ctx); err != nil {\n\tif errors.Is(err, utils.ErrNotSUP) {\n\t\treturn nil // or mark unsupported, not failure\n\t}\n\treturn err\n}","preventionTips":["Use errors.Is(err, utils.ErrNotSUP) to branch, never string compare","Feature-detect backend capabilities before benchmarking/admin ops","Document which backends lack ownership/permission APIs"],"tags":["object-storage","unsupported-operation","benchmark"],"backgroundTag":"unsupported-operation","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}