juicedata/juicefs · error
get not existed object should failed: %s
Error message
get not existed object should failed: %s
What it means
Returned by objbench when attempting to GET a key that was never uploaded does not produce the expected not-found error path — the test expects the read of a nonexistent object to fail, and reports the unexpected error or content instead.
Source
Thrown at cmd/objbench.go:803
runCase("get an object", func(blob object.ObjectStorage) error {
br := []byte("hello")
if err := blob.Put(ctx, key, bytes.NewReader(br)); err != nil {
return fmt.Errorf("put object failed: %s", err)
}
defer blob.Delete(ctx, key) //nolint:errcheck
if d, e := get(blob, key, 0, -1); e != nil || d != string(br) {
return fmt.Errorf(`failed to get an object: expect "hello", but got %v, error: %s`, d, e)
}
if d, e := get(blob, key, 0, 5); e != nil || d != string(br) {
return fmt.Errorf(`failed to get an object: expect "hello", but got %v, error: %s`, d, e)
}
return nil
})
runCase("get non-exist", func(blob object.ObjectStorage) error {
if _, err := blob.Get(ctx, "not_exists_file", 0, -1); err == nil {
return fmt.Errorf("get not existed object should failed: %s", err)
}
return nil
})
runCase("get partial object", func(blob object.ObjectStorage) error {
br := []byte("hello")
if err := blob.Put(ctx, key, bytes.NewReader(br)); err != nil {
return fmt.Errorf("put object failed: %s", err)
}
defer blob.Delete(ctx, key) //nolint:errcheck
// get first
if d, e := get(blob, key, 0, 1); e != nil || d != "h" {
return fmt.Errorf(`failed to get the first byte:, expect "h", but got %q, error: %s`, d, e)
}
// get last
if d, e := get(blob, key, 4, 1); e != nil || d != "o" {
return fmt.Errorf(`failed to get the last byte: expect "o", but got %q, error: %s`, d, e)View on GitHub (pinned to c9a67b23e8)
Solutions
- Verify the backend returns proper 404-style errors for missing objects
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cmd/objbench.go:803 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/cbb516044752fe61.
Report an issue: GitHub.