juicedata/juicefs · info

ErrNotSUP

ErrNotSUP

Error message

not supported

What it means

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.

Source

Thrown at pkg/utils/errors.go:25

 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package utils

import (
	"errors"
	"syscall"
)

var (
	ErrNotSUP      = errors.New("not supported")
	ErrFuncTimeout = errors.New("function timeout")
	ErrSkipped     = errors.New("skipped")
	ErrExtlink     = syscall.Errno(1000)
)

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Treat this error as expected — skip or mark the operation unsupported (as objbench does with errors.Is)
  2. Avoid calling the unsupported API on that backend
  3. Use a backend/ACL layer that supports the operation if the capability is required

Example fix

// before
if err := doChmod(ctx, key); err != nil { return err }
// after
if err := doChmod(ctx, key); err != nil {
	if errors.Is(err, utils.ErrNotSUP) { return nil } // unsupported here
	return err
}
Defensive patterns

Strategy: try-catch

Validate before calling

// feature-detect before calling
type chownSupport interface{ Chown(ctx context.Context, key string, owner, group uint32) error }
_, supported := store.(chownSupport)

Type guard

func isUnsupported(err error) bool { return errors.Is(err, utils.ErrNotSUP) }

Try / catch

if err := op(ctx); err != nil {
	if errors.Is(err, utils.ErrNotSUP) {
		return nil // or mark unsupported, not failure
	}
	return err
}

Prevention

When it happens

Trigger: 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.

Common situations: Benchmarking object stores (e.g. S3) that have no POSIX ownership/permission model; using a minimal backend that omits optional interfaces.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06). Data as JSON: /api/errors/6a878f780155a643. Report an issue: GitHub.